Преглед на файлове

Merge pull request #11936 from softue/auth-redirect

fix: redirection for users already logged in
Timothy Jaeryang Baek преди 1 месец
родител
ревизия
f872bda19b
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/routes/auth/+page.svelte

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

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