From 865abc005a3bd2149a475397e16f8e7416abe7ba Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 18 Feb 2020 21:49:53 +0100 Subject: [PATCH] sources/oauth: remove leading spaces in default URLs --- passbook/sources/oauth/forms.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/passbook/sources/oauth/forms.py b/passbook/sources/oauth/forms.py index 04be391ec..78c187122 100644 --- a/passbook/sources/oauth/forms.py +++ b/passbook/sources/oauth/forms.py @@ -50,7 +50,7 @@ class GitHubOAuthSourceForm(OAuthSourceForm): "request_token_url": "", "authorization_url": "https://github.com/login/oauth/authorize", "access_token_url": "https://github.com/login/oauth/access_token", - "profile_url": " https://api.github.com/user", + "profile_url": "https://api.github.com/user", } @@ -64,7 +64,10 @@ class TwitterOAuthSourceForm(OAuthSourceForm): "request_token_url": "https://api.twitter.com/oauth/request_token", "authorization_url": "https://api.twitter.com/oauth/authenticate", "access_token_url": "https://api.twitter.com/oauth/access_token", - "profile_url": " https://api.twitter.com/1.1/account/verify_credentials.json", + "profile_url": ( + "https://api.twitter.com/1.1/account/" + "verify_credentials.json?include_email=true" + ), } @@ -78,7 +81,7 @@ class FacebookOAuthSourceForm(OAuthSourceForm): "request_token_url": "", "authorization_url": "https://www.facebook.com/v2.8/dialog/oauth", "access_token_url": "https://graph.facebook.com/v2.8/oauth/access_token", - "profile_url": " https://graph.facebook.com/v2.8/me?fields=name,email,short_name", + "profile_url": "https://graph.facebook.com/v2.8/me?fields=name,email,short_name", } @@ -92,7 +95,7 @@ class DiscordOAuthSourceForm(OAuthSourceForm): "request_token_url": "", "authorization_url": "https://discordapp.com/api/oauth2/authorize", "access_token_url": "https://discordapp.com/api/oauth2/token", - "profile_url": " https://discordapp.com/api/users/@me", + "profile_url": "https://discordapp.com/api/users/@me", } @@ -106,7 +109,7 @@ class GoogleOAuthSourceForm(OAuthSourceForm): "request_token_url": "", "authorization_url": "https://accounts.google.com/o/oauth2/auth", "access_token_url": "https://accounts.google.com/o/oauth2/token", - "profile_url": " https://www.googleapis.com/oauth2/v1/userinfo", + "profile_url": "https://www.googleapis.com/oauth2/v1/userinfo", } @@ -120,5 +123,5 @@ class AzureADOAuthSourceForm(OAuthSourceForm): "request_token_url": "", "authorization_url": "https://login.microsoftonline.com/common/oauth2/authorize", "access_token_url": "https://login.microsoftonline.com/common/oauth2/token", - "profile_url": " https://graph.windows.net/myorganization/me?api-version=1.6", + "profile_url": "https://graph.windows.net/myorganization/me?api-version=1.6", }