pennersr / django-allauth

Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
https://allauth.org
MIT License
9.54k stars 3.03k forks source link

Third-Party Login Failure on the production server but it works fine on the localhost #3958

Closed muhameddadel closed 3 months ago

muhameddadel commented 3 months ago

Here are my settings SOCIALACCOUNT_PROVIDERS = { "google": { "APP": { "client_id": os.getenv("GOOGLE_OAUTH2_CLIENT_ID"), "secret": os.getenv("GOOGLE_OAUTH2_CLIENT_SECRET"), }, "SCOPE": [ "profile", "email", "https://www.googleapis.com/auth/analytics.readonly", ], "AUTH_PARAMS": { "access_type": "offline", "prompt": "consent", "redirect_uri": f"https://{settings.HOST}/accounts/google/login/callback/" }, "METHOD": "oauth2", "INIT_PARAMS": {"cookie": True}, "STORE_TOKENS": True, "EXCHANGE_TOKEN": True, "VERIFIED_EMAIL": False, } } everything works fine when I was trying on the localhost but after push the code to the server it gives me Third-party login Failure and I have checked the .env file and I've found everything setup well

pennersr commented 3 months ago

Closing -- this is a project specific deployment issue, not an issue in allauth.