Add 42Oauth #37
|
@ -36,7 +36,6 @@ def connect_intra42(request):
|
|||
site = Site.objects.get_current()
|
||||
redirect_uri = reverse('accounts:connections-connect-intra42-authorize')
|
||||
redirect_uri = "https://" + site.domain + redirect_uri[3:] # remove language code
|
||||
print(redirect_uri)
|
||||
return oauth.intra42.authorize_redirect(request, redirect_uri)
|
||||
|
||||
@login_required
|
||||
|
@ -90,7 +89,6 @@ def authorize_discord(request):
|
|||
return redirect('accounts:edit')
|
||||
response = oauth.discord.get('users/@me', token=token)
|
||||
response = response.json()
|
||||
print(response)
|
||||
discord_id = response['id']
|
||||
request.user.userprofileinfo.discord_id = discord_id
|
||||
request.user.userprofileinfo.save()
|
||||
|
|
Loading…
Reference in New Issue