Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oauth/Social backends - very minor cleanup #13195

Closed
wants to merge 2 commits into from

Conversation

mateuszmandera
Copy link
Contributor

@mateuszmandera mateuszmandera commented Sep 19, 2019

As explained in the commits, there is a bit of a weird juggling of "social backend" / "oauth backend" concepts in the code, where we're better served just thinking of "social backends".

Otherwise, when we add SAML, we would have to add some additional logic dealing with the fact that it's a "social" backend, but not an oauth backend and things would just get more confusing, for no benefit.

SOCIAL_AUTH_BACKEND / OAUTH_BACKEND_NAMES are currently the same
backends. All Oauth backends are social, and all social are oauth.
So we get rid of OAUTH_BACKEND_NAMES and use only SOCIAL_AUTH_BACKENDS.
any_oauth_backend_enabled is all about whether we will have extra
buttons on the login/register pages for logging in with some non-native
backends (like Github, Google etc.). And this isn't about specifically
oauth backends, but generally "social" backends - that may not rely
specifically rely on Oauth. This will have more concrete relevance when
SAML authentication is added - which will be a "social" backend,
requiring an additional button, but not Oauth-based.
@timabbott
Copy link
Sponsor Member

These are great, merged, thanks @mateuszmandera!

Effectively cleanups we should have done after we integrated the python-social-auth Google auth backend (which removed the only oauth, non-"social", backend).

@timabbott timabbott closed this Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants