The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Simplify the sign-in page.
Ivan Vasilov5aac02b441af
diff --git a/studio/pages/sign-in.tsx b/studio/pages/sign-in.tsxindex 39270ebdf65..802b60eed2d 100644--- a/studio/pages/sign-in.tsx+++ b/studio/pages/sign-in.tsx@@ -1,37 +1,19 @@import Link from 'next/link'-import { NextPageWithLayout } from 'types'import SignInForm from 'components/interfaces/SignIn/SignInForm'import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'import SignInWithSSO from 'components/interfaces/SignIn/SignInWithSSO'import { SignInLayout } from 'components/layouts'-import { useEffect } from 'react'import { IS_PLATFORM } from 'lib/constants'import { useRouter } from 'next/router'-import { auth } from 'lib/gotrue'+import { NextPageWithLayout } from 'types'const SignInPage: NextPageWithLayout = () => {const router = useRouter()- useEffect(() => {- // if the dashboard is running locally, redirect straight to the projects page- if (!IS_PLATFORM) {- router.replace('/project/default')- return- }-- const {- data: { subscription },- } = auth.onAuthStateChange((event) => {- if (event === 'SIGNED_IN') {- // if user has signed in on another tab, take them to the home page- router.replace('/projects')- }- })-- return () => {- subscription.unsubscribe()- }- }, [])+ if (!IS_PLATFORM) {+ // on selfhosted instance just redirect to projects page+ router.replace('/project/default')+ }return (<>