mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
doc update : Updated the redirect path if user is not found (#22531)
Updated the redirect path if user is not found Because the redirect path was `/` when I logged out and then went to something like `localhost:3000/` , this cause an infinite redirect loop and caused the app to break. Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
This commit is contained in:
1 parent
31a8add418
commit
b2fd97c36f
1 file changed
+1
-1
@@ -495,7 +495,7 @@ export default async function PrivatePage() {
|
||||
|
||||
const { data, error } = await supabase.auth.getUser()
|
||||
if (error || !data?.user) {
|
||||
redirect('/')
|
||||
redirect('/login')
|
||||
}
|
||||
|
||||
return <p>Hello {data.user.email}</p>
|
||||
|
||||
Reference in new issue
Block a user