From 60d50a6c07ea7957275cdc1b346a3161bd8ea352 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 16 Nov 2020 04:10:36 +0100 Subject: [PATCH] requesting email is useless --- lglog/middlewares.py | 1 - lglog/settings.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lglog/middlewares.py b/lglog/middlewares.py index 54967d7..3371e9d 100644 --- a/lglog/middlewares.py +++ b/lglog/middlewares.py @@ -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() diff --git a/lglog/settings.py b/lglog/settings.py index ece723c..395517c 100644 --- a/lglog/settings.py +++ b/lglog/settings.py @@ -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',