Skip to content

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

move basePath logic for sign up/sign in

Jonathan Summers-Muircdb801549a8f
diff --git a/studio/.env b/studio/.env
index e66cc5523ed..03107e25865 100644
--- a/studio/.env
+++ b/studio/.env
@@ -1,3 +1,5 @@
+NEXT_PUBLIC_BASE_PATH=/dashboard
+
STUDIO_PG_META_URL=http://localhost:8000/pg
POSTGRES_PASSWORD=your-super-secret-and-long-postgres-password
diff --git a/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx b/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
index 6e00a5ed6c2..15152f78fec 100644
--- a/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
+++ b/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
@@ -36,9 +36,9 @@ const ForgotPasswordForm = () => {
hcaptchaToken: token ?? undefined,
redirectTo: `${
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
- ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL + (basePath && `/${basePath}`)
+ ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }/reset-password`,
+ }${basePath}/reset-password`,
})
const error = response.error
diff --git a/studio/components/interfaces/SignIn/SignInSSOForm.tsx b/studio/components/interfaces/SignIn/SignInSSOForm.tsx
index a48468883ce..50d46dad0f6 100644
--- a/studio/components/interfaces/SignIn/SignInSSOForm.tsx
+++ b/studio/components/interfaces/SignIn/SignInSSOForm.tsx
@@ -37,9 +37,9 @@ const SignInSSOForm = () => {
captchaToken: token ?? undefined,
redirectTo: `${
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
- ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL + (basePath && `${basePath}`)
+ ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }${getReturnToPath()}`,
+ }${basePath}${getReturnToPath()}`,
},
})
diff --git a/studio/components/interfaces/SignIn/SignInWithGitHub.tsx b/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
index eca1f688296..5fcc0d98522 100644
--- a/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
+++ b/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
@@ -11,9 +11,9 @@ const SignInWithGitHub = () => {
options: {
redirectTo: `${
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
- ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL + (basePath && `${basePath}`)
+ ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }${getReturnToPath()}`,
+ }${basePath}${getReturnToPath()}`,
},
})
if (error) throw error
diff --git a/studio/components/interfaces/SignIn/SignUpForm.tsx b/studio/components/interfaces/SignIn/SignUpForm.tsx
index d232e06d6ff..f2b33bfcd27 100644
--- a/studio/components/interfaces/SignIn/SignUpForm.tsx
+++ b/studio/components/interfaces/SignIn/SignUpForm.tsx
@@ -41,9 +41,9 @@ const SignUpForm = () => {
hcaptchaToken: token ?? null,
redirectTo: `${
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
- ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL + (basePath && `${basePath}`)
+ ? 'https://' + process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }/sign-in`,
+ }${basePath}/sign-in`,
})
const error = response.error