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

Confusing docs for Django #376

Open
miguelem opened this issue Jun 27, 2022 · 1 comment
Open

Confusing docs for Django #376

miguelem opened this issue Jun 27, 2022 · 1 comment

Comments

@miguelem
Copy link

I'm trying to follow the instructions on https://python-social-auth.readthedocs.io/en/latest/configuration/django.html and they are pretty confusing for a newbie.

First, I think the "URL entries" code (https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries) is incorrect or referring to an old Django version. If I put that code it gives me an error: name 'url' is not defined
I guess it should be "path", not "url" (with that change it doesn't show an error, but not sure if it will work).
Also, I'm not sure if that code should be in the main project's urls.py or in the app's urls.py.

Then on https://python-social-auth.readthedocs.io/en/latest/configuration/settings.html it doesn't explain where those settings/codes should be introduced. The settings.py file from the main Django project? Somewhere else?

I guess this is obvious for most people, but it's certainly not for newbies like me.

Additional explanations and context would be great.

Also, do you think this library is a good option for a newbie that only wants to use Google's Oauth2 (for Google Ads API)? Or are there better Django libraries for this use case?

Thanks!

@tiago-peres
Copy link

Definitely agree that the documentation is not the best but to me is relatively straightforward to implement and test what one wants.

do you think this library is a good option for a newbie that only wants to use Google's Oauth2

For Google OAuth 2.0 you'll have to use

SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
    ...
    'social_core.backends.google.GoogleOAuth2',
    ...
)

as one can see here. Just by looking in the Google OAuth2 we wouldn't really know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants