mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2026-02-04 10:14:15 +02:00
changed a bunch of stuff to async
This commit is contained in:
@@ -137,14 +137,14 @@ class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient):
|
||||
"""
|
||||
return session.get("DISCORD_OAUTH2_TOKEN")
|
||||
|
||||
def callback(self):
|
||||
async def callback(self):
|
||||
"""A method which should be always called after completing authorization code grant process
|
||||
usually in callback view.
|
||||
It fetches the authorization token and saves it quart
|
||||
`session <https://pgjones.gitlab.io/quart/reference/source/quart.sessions.html#quart.sessions.Session>`_ object.
|
||||
|
||||
"""
|
||||
error = request.values.get("error")
|
||||
error = await request.values.get("error")
|
||||
if error:
|
||||
if error == "access_denied":
|
||||
raise exceptions.AccessDenied()
|
||||
|
||||
Reference in New Issue
Block a user