fangli / django-saml2-auth

Django SAML2 Authentication Made Easy. Easily integrate with SAML2 SSO identity providers like Okta
Other
504 stars 223 forks source link

Hooks should be passed the User instance #163

Open tchaumeny opened 3 years ago

tchaumeny commented 3 years ago

Currently, the hooks CREATE_USER and BEFORE_LOGIN are passed the user_identity from SAML.

They should also be passed a the matching target_user — it is available at that point. That would help implement features like checking for specific flags on User to authorize SAML login or saving information related to user when created or logged in.