Add 42Oauth #37

Merged
Danhia merged 5 commits from :main into 42OAuth 2022-03-29 19:51:57 +02:00
1 changed files with 0 additions and 2 deletions
Showing only changes of commit e480aec493 - Show all commits

View File

@ -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()