Do not immediately pop the state to prevent race conditions

This commit is contained in:
thec0sm0s
2020-10-26 00:00:23 +05:30
parent 8bc15b23ad
commit 87fe69e9e2

View File

@@ -55,7 +55,7 @@ class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient):
@staticmethod
def __get_state():
return session.pop("DISCORD_OAUTH2_STATE", str())
return session.get("DISCORD_OAUTH2_STATE", str())
def create_session(
self, scope: list = None, *, data: dict = None, prompt: bool = True,