Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
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
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