requesting email is useless

This commit is contained in:
Yohann D'ANELLO 2020-11-16 04:10:36 +01:00
parent e4bfcf6043
commit 60d50a6c07
2 changed files with 1 additions and 2 deletions

View File

@ -68,7 +68,6 @@ class OAuthMiddleware(MiddlewareMixin):
user, _ = DiscordUser.objects.get_or_create(discord_id=discord_id)
user.username = user_json['username']
user.discriminator = user_json['discriminator']
user.email = user_json['email']
user.avatar_id = user_json['avatar']
user.is_staff = user.is_superuser = f"{user.username}#{user.discriminator}" in settings.SUPERUSERS
user.save()

View File

@ -156,7 +156,7 @@ OAUTH_CLIENT = {
'api_base_url': 'https://discordapp.com/api/',
'redirect_uri': 'http://localhost:8000/oauth/callback',
'client_kwargs': {
'scope': 'identify email',
'scope': 'identify',
'token_placement': 'header'
},
'userinfo_endpoint': 'users/@me',