Browse Source

fix: redirection for users already logged in

Rômulo Mendes Figueiredo 1 month ago
parent
commit
c4c6e02b4c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/routes/auth/+page.svelte

+ 2 - 1
src/routes/auth/+page.svelte

@@ -140,7 +140,8 @@
 
 
 	onMount(async () => {
 	onMount(async () => {
 		if ($user !== undefined) {
 		if ($user !== undefined) {
-			await goto('/');
+			const redirectPath = querystringValue('redirect') || '/';
+			goto(redirectPath);
 		}
 		}
 		await checkOauthCallback();
 		await checkOauthCallback();