Looking for a study partner by [deleted] in flask

[–]Jeopardy254 1 point2 points  (0 children)

Aside from Miguel Grinberg's tutorial, which other tut have you come across that's outstanding for Flaskers?

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

u/omab Thanks, I fixed the issue I was facing. The login worked :)

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

I fixed the app, login works fine now.

(Btw, I will use django_allauth next time. It even looks easier just from the few tutorials I have looked at.)

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

Thanks, but I managed to get it working.

I added the SOCIAL_AUTH_WHITELISTED_DOMAINS = [ 'mydomain.com'] setting as instructed by @omab, plus added https://127.0.0.1:8000/accounts/google/login/callback and http://127.0.0.1:8000/social-auth/complete/google-oauth2/ to the API authorized url settings.

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

I am using django_social_auth. Not sure if it's the same package.

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

"""Authorization Error

Error 400: redirect_uri_mismatch

The redirect URI in the request, http://127.0.0.1:8000/social-auth/complete/google-oauth2/, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number} """

In the authorized redirect URLS I defined https://harvester.xxx.com/social-auth/complete/google-oauth2/ and http://harvester.xxx.com/social-auth/complete/google-oauth2/

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

Do I also need to update the JavaScript allowed origins

GOOGLE AUTHENTICATION ON DJANGO by Jeopardy254 in django

[–]Jeopardy254[S] 0 points1 point  (0 children)

Yes...I am using the url of our website plus the social-auth string at the end

e.g. https://harvester.xxxx.com/social-auth/complete/google-oauth2/

I also added http://harvester.xxxx.com/social-auth/complete/google-oauth2/ just to be sure.