try getting oauth2 token from session

This commit is contained in:
thecosmos
2019-05-07 21:50:28 +05:30
parent c5af5ab91a
commit c0d4742dcf

View File

@@ -22,7 +22,7 @@ class DiscordOAuth2HttpClient(object):
def _make_session(self, token=None, state=None, scope=None): def _make_session(self, token=None, state=None, scope=None):
return OAuth2Session( return OAuth2Session(
client_id=self.client_id, client_id=self.client_id,
token=token, token=token or session.get("oauth2_token"),
state=state, state=state,
scope=scope, scope=scope,
redirect_uri=self.redirect_uri, redirect_uri=self.redirect_uri,