diff options
| author | Fuwn <[email protected]> | 2023-07-25 15:13:48 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-25 15:13:48 -0700 |
| commit | f674d912398e2fa867bab914a43f4c0e99ca4e5c (patch) | |
| tree | ae64ac6874681a189207d8cbc68b610158dde2f0 | |
| parent | feat(html): open links in new tab (diff) | |
| download | old.due.moe-f674d912398e2fa867bab914a43f4c0e99ca4e5c.tar.xz old.due.moe-f674d912398e2fa867bab914a43f4c0e99ca4e5c.zip | |
docs(index): refresh token functionality
| -rw-r--r-- | src/due/routes/index.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/due/routes/index.py b/src/due/routes/index.py index 545c640..e9e355c 100644 --- a/src/due/routes/index.py +++ b/src/due/routes/index.py @@ -21,6 +21,20 @@ def home(): response = redirect("/") response.set_cookie("hide_message", "1") + # print( + # requests.post( + # "https://anilist.co/api/v2/oauth/token", + # data={ + # "grant_type": "refresh_token", + # "client_id": os.getenv("ANILIST_CLIENT_ID"), + # "client_secret": os.getenv("ANILIST_CLIENT_SECRET"), + # "refresh_token": json.loads(request.cookies.get("anilist"))[ + # "refresh_token" + # ], + # }, + # ).json() + # ) + if request.cookies.get("anilist"): anilist = json.loads(request.cookies.get("anilist")) start = time.time() |