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

Custom OAuth authentication #78

Open
Tracked by #2
simonwinter opened this issue May 12, 2020 · 0 comments
Open
Tracked by #2

Custom OAuth authentication #78

simonwinter opened this issue May 12, 2020 · 0 comments

Comments

@simonwinter
Copy link

Hi there,

I'm attempting to use a custom Oauth2 based social auth backend as per https://python-social-auth.readthedocs.io/en/latest/backends/implementation.html#oauth

However, I am unable to get this to work. I've added the following:

  1. A class that implements BaseOAuth2
  2. Specified the class as an authentication backend:
AUTHENTICATION_BACKENDS = (
    'starterkit.backends.test.TestOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)
  1. Updated the SOCIAL_AUTH_PIPELINE to include this:
SOCIAL_AUTH_PIPELINE = (
    'social_core.pipeline.social_auth.social_details',
    'social_core.pipeline.social_auth.social_uid',
    'social_core.pipeline.social_auth.auth_allowed',
    'starterkit.backends.test.TestOAuth2.user_data',
    'social_core.pipeline.social_auth.social_user',
    'social_core.pipeline.social_auth.associate_user',
    'social_core.pipeline.social_auth.load_extra_data',
    'social_core.pipeline.user.user_details',
)

My question is:

  1. Is this approach valid? Should I expect to add an authentication method to social auth?
  2. If it is, do you know if it's possible to enable some sort of logging to see what is going on under the hood?

This is likely an implementation on our code - I'm really checking that this approach is valid.

Thanks

@sheppard sheppard mentioned this issue Aug 23, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant