Minor changes

This commit is contained in:
thecosmos
2019-05-06 22:53:03 +05:30
parent 5f0a16d1b5
commit 1a9a6d84f0
2 changed files with 9 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class DiscordOAuth2Session(object):
token_updater=self.__token_updater)
def make_session(self):
scope = request.args.get("scope", configs.DEFAULT_SCOPES).split()
scope = request.args.get("scope", str()).split() or configs.DEFAULT_SCOPES
discord_session = self.__make_session(scope=scope)
authorization_url, state = discord_session.authorization_url(configs.AUTHORIZATION_BASE_URL)
session["oauth2_state"] = state