79321655

Date: 2025-01-01 13:19:01
Score: 0.5
Natty:
Report link

Try to login user with google and look he has a mail or this field is empty (user.mail)?

And hide your secret keys, like this:

project tree

root
--config
----settings.py 
.env

first you need pip install python-dotenv

root/config/settings.py

import os
from dotenv import load_dotenv
    

load_dotenv()

SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = os.environ.get("GOOGLE_KEY")
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.environ.get("GOOGLE_SECRET")

.env it's file name is required, you can put it in root dir or other place you like (in .env not necessary to put quotation marks like GOOGLE_KEY="YOUR_KEY")

.env

GOOGLE_KEY=YOUR_KEY
GOOGLE_SECRET=YOUR_SECRET
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Thermocarst