diff options
| author | Fuwn <[email protected]> | 2023-12-15 23:58:50 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-15 23:58:50 -0800 |
| commit | b1cc0e327aba62dbeb43b1dd2aa910341bc96aa0 (patch) | |
| tree | f0bcbe1c7cd7fd25bc8c428d8abf08e609f8ae39 /src | |
| parent | feat(notifications): refresh token (diff) | |
| download | due.moe-b1cc0e327aba62dbeb43b1dd2aa910341bc96aa0.tar.xz due.moe-b1cc0e327aba62dbeb43b1dd2aa910341bc96aa0.zip | |
feat(error): more error debugging
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/Error.svelte | 6 | ||||
| -rw-r--r-- | src/routes/api/oauth/refresh/+server.ts | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/Error.svelte b/src/lib/Error.svelte index a78fceb4..617cabfb 100644 --- a/src/lib/Error.svelte +++ b/src/lib/Error.svelte @@ -9,7 +9,11 @@ <a href="https://en.wikipedia.org/wiki/Rate_limiting" target="_blank">rate limited</a>. </p> <p> - Try again in a few minutes. If the problem persists, please contact + Your login session may have expired. Try logging out and logging back in, or try again in a + few minutes. + </p> + <p> + If the problem persists, please contact <a href="https://anilist.co/user/fuwn" target="_blank">@fuwn</a> on AniList. </p> </li> diff --git a/src/routes/api/oauth/refresh/+server.ts b/src/routes/api/oauth/refresh/+server.ts index ceb2566d..8bfac6e6 100644 --- a/src/routes/api/oauth/refresh/+server.ts +++ b/src/routes/api/oauth/refresh/+server.ts @@ -1,6 +1,7 @@ import { dev } from '$app/environment'; import { env } from '$env/dynamic/private'; import { env as env2 } from '$env/dynamic/public'; +import { redirect } from '@sveltejs/kit'; export const GET = async ({ url, cookies }) => { const formData = new FormData(); @@ -25,5 +26,6 @@ export const GET = async ({ url, cookies }) => { secure: !dev }); - return Response.json(newUser); + if (url.searchParams.get('redirect')) throw redirect(303, '/'); + else return Response.json(newUser); }; |