requesting email is useless
This commit is contained in:
parent
e4bfcf6043
commit
60d50a6c07
@ -68,7 +68,6 @@ class OAuthMiddleware(MiddlewareMixin):
|
|||||||
user, _ = DiscordUser.objects.get_or_create(discord_id=discord_id)
|
user, _ = DiscordUser.objects.get_or_create(discord_id=discord_id)
|
||||||
user.username = user_json['username']
|
user.username = user_json['username']
|
||||||
user.discriminator = user_json['discriminator']
|
user.discriminator = user_json['discriminator']
|
||||||
user.email = user_json['email']
|
|
||||||
user.avatar_id = user_json['avatar']
|
user.avatar_id = user_json['avatar']
|
||||||
user.is_staff = user.is_superuser = f"{user.username}#{user.discriminator}" in settings.SUPERUSERS
|
user.is_staff = user.is_superuser = f"{user.username}#{user.discriminator}" in settings.SUPERUSERS
|
||||||
user.save()
|
user.save()
|
||||||
|
@ -156,7 +156,7 @@ OAUTH_CLIENT = {
|
|||||||
'api_base_url': 'https://discordapp.com/api/',
|
'api_base_url': 'https://discordapp.com/api/',
|
||||||
'redirect_uri': 'http://localhost:8000/oauth/callback',
|
'redirect_uri': 'http://localhost:8000/oauth/callback',
|
||||||
'client_kwargs': {
|
'client_kwargs': {
|
||||||
'scope': 'identify email',
|
'scope': 'identify',
|
||||||
'token_placement': 'header'
|
'token_placement': 'header'
|
||||||
},
|
},
|
||||||
'userinfo_endpoint': 'users/@me',
|
'userinfo_endpoint': 'users/@me',
|
||||||
|
Loading…
Reference in New Issue
Block a user