Check for session in Flask session

This commit is contained in:
thec0sm0s
2020-05-11 21:06:26 +05:30
parent 4d278557aa
commit 94d0c536c5

View File

@@ -66,7 +66,7 @@ class DiscordOAuth2HttpClient(abc.ABC):
return OAuth2Session( return OAuth2Session(
client_id=self.client_id, client_id=self.client_id,
token=token or session.get("DISCORD_OAUTH2_TOKEN"), token=token or session.get("DISCORD_OAUTH2_TOKEN"),
state=state, state=state or session.get("DISCORD_OAUTH2_STATE"),
scope=scope, scope=scope,
redirect_uri=self.redirect_uri, redirect_uri=self.redirect_uri,
auto_refresh_kwargs={ auto_refresh_kwargs={