aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-03-29 10:03:17 +0100
committerGravatar Gareth Coles <[email protected]>2018-03-29 10:03:17 +0100
commit0d0a22b1931c5bbe24f1f620f4e5a60475997d16 (patch)
tree6759ac59b6120cfb29f6a015cf280432a6a5de52
parentMerge remote-tracking branch 'origin/master' (diff)
OAuth fixes
-rw-r--r--pysite/constants.py2
-rw-r--r--pysite/oauth.py1
2 files changed, 1 insertions, 2 deletions
diff --git a/pysite/constants.py b/pysite/constants.py
index 7df4674e..03b660d6 100644
--- a/pysite/constants.py
+++ b/pysite/constants.py
@@ -27,7 +27,7 @@ SERVER_ID = 267624335836053506
DISCORD_API_ENDPOINT = "https://discordapp.com/api"
DISCORD_OAUTH_REDIRECT = "/auth/discord"
-DISCORD_OAUTH_AUTHORIZED = "/auth/discord/authorized"
+DISCORD_OAUTH_AUTHORIZED = environ.get("DISCORD_OAUTH_AUTHORIZED", "https://pythondiscord.com/auth/discord/authorized")
DISCORD_OAUTH_ID = environ.get('DISCORD_OAUTH_ID', '')
DISCORD_OAUTH_SECRET = environ.get('DISCORD_OAUTH_SECRET', '')
DISCORD_OAUTH_SCOPE = 'identify email guilds.join'
diff --git a/pysite/oauth.py b/pysite/oauth.py
index 8370b713..a4b5bdb1 100644
--- a/pysite/oauth.py
+++ b/pysite/oauth.py
@@ -37,7 +37,6 @@ class OauthBackend(BaseBackend):
def set(self, blueprint, token):
user = self.get_user()
- self.join_discord(token["access_token"], user["id"])
sess_id = str(uuid5(uuid4(), self.key))
self.add_user(token, user, sess_id)