浏览代码

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();