Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: checkRedirectTo compare pathname value instead of asPath to ignore url params

phamhieua831f8242b7e
diff --git a/studio/hooks/misc/withAuth.tsx b/studio/hooks/misc/withAuth.tsx
index 89b0ff9712a..a0571bc07ad 100644
--- a/studio/hooks/misc/withAuth.tsx
+++ b/studio/hooks/misc/withAuth.tsx
@@ -83,7 +83,7 @@ function checkRedirectTo(
redirectIfFound?: boolean
) {
if (loading) return false
- if (router.asPath == redirectTo) return false
+ if (router.pathname == redirectTo) return false
// If redirectTo is set, redirect if the user was not found.
if (redirectTo && !redirectIfFound && !profile) return true