auth-backends
auth-backends copied to clipboard
Property name 'full_name' should be spelled 'fullname' without underscores
Hello,
I believe there is a spelling error at the file auth_backends/backends.py, line 12
I think it should be written 'fullname' without underscores, and not 'full_name'.
This is used for mapping the claims provided in the JWT returned by the OAuth authorization code grant flow, but the name 'full_name' is not recognized at the 'registration' part of the pipeline, which in turn leaves the corresponding registration field empty, making it impossible to proceed with a SSO without the user confirming the registration form (in the case it's the first time a user gets registered in by means of third party SSO).
Changing it into 'fullname' makes this work.
Tested using a production environment using the "auth_backends.backends.EdXOAuth2" backend used for SSO of LMS with a custom OAuth2 identity provider.
I don't know if it was the original purpose, but I found this implementation to be very useful to be used for SSO with a generic third party OAuth2 Identity Provider implemented in house (not one of those well known public providers already listed in python-social-auth).
FYI @feanil should this be part of auth cleanup?