Skip to content

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

renames sign in routes

Alaister Young27c00c1ec909
diff --git a/studio/components/interfaces/Home/Landing.tsx b/studio/components/interfaces/Home/Landing.tsx
index 4e799acfe37..7a57e159bac 100644
--- a/studio/components/interfaces/Home/Landing.tsx
+++ b/studio/components/interfaces/Home/Landing.tsx
@@ -20,7 +20,7 @@ const Landing = () => {
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
? process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }?auth=true`,
+ }`,
},
})
if (error) throw error
diff --git a/studio/components/interfaces/Login/ForgotPasswordForm.tsx b/studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
similarity index 100%
rename from studio/components/interfaces/Login/ForgotPasswordForm.tsx
rename to studio/components/interfaces/SignIn/ForgotPasswordForm.tsx
diff --git a/studio/components/interfaces/Login/ResetPasswordForm.tsx b/studio/components/interfaces/SignIn/ResetPasswordForm.tsx
similarity index 100%
rename from studio/components/interfaces/Login/ResetPasswordForm.tsx
rename to studio/components/interfaces/SignIn/ResetPasswordForm.tsx
diff --git a/studio/components/interfaces/Login/LoginForm.tsx b/studio/components/interfaces/SignIn/SignInForm.tsx
similarity index 81%
rename from studio/components/interfaces/Login/LoginForm.tsx
rename to studio/components/interfaces/SignIn/SignInForm.tsx
index 15f5fe20c0f..852370bd567 100644
--- a/studio/components/interfaces/Login/LoginForm.tsx
+++ b/studio/components/interfaces/SignIn/SignInForm.tsx
@@ -1,4 +1,5 @@
import { useStore } from 'hooks'
+import { useParams } from 'hooks/misc/useParams'
import { auth } from 'lib/gotrue'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -6,17 +7,18 @@ import { useSWRConfig } from 'swr'
import { Button, Form, Input } from 'ui'
import { object, string } from 'yup'
-const loginSchema = object({
+const signInSchema = object({
email: string().email('Must be a valid email').required('Email is required'),
password: string().required('Password is required'),
})
-const LoginForm = () => {
+const SignInForm = () => {
const { ui } = useStore()
const router = useRouter()
+ const { returnTo } = useParams()
const { cache } = useSWRConfig()
- const onLogin = async ({ email, password }: { email: string; password: string }) => {
+ const onSignIn = async ({ email, password }: { email: string; password: string }) => {
const toastId = ui.setNotification({
category: 'loading',
message: `Logging in...`,
@@ -28,14 +30,14 @@ const LoginForm = () => {
ui.setNotification({
id: toastId,
category: 'success',
- message: `Logged in successfully!`,
+ message: `Signed in successfully!`,
})
// .clear() does actually exist on the cache object, but it's not in the types 🤦🏻
// @ts-ignore
cache.clear()
- await router.push('/projects')
+ await router.push(returnTo ?? '/projects')
} else {
ui.setNotification({
id: toastId,
@@ -48,10 +50,10 @@ const LoginForm = () => {
return (
<Form
validateOnBlur
- id="login-form"
+ id="signIn-form"
initialValues={{ email: '', password: '' }}
- validationSchema={loginSchema}
- onSubmit={onLogin}
+ validationSchema={signInSchema}
+ onSubmit={onSignIn}
>
{({ isSubmitting }: { isSubmitting: boolean }) => {
return (
@@ -79,13 +81,13 @@ const LoginForm = () => {
<Button
block
- form="login-form"
+ form="signIn-form"
htmlType="submit"
size="large"
disabled={isSubmitting}
loading={isSubmitting}
>
- Login
+ Sign In
</Button>
</div>
)
@@ -94,4 +96,4 @@ const LoginForm = () => {
)
}
-export default LoginForm
+export default SignInForm
diff --git a/studio/components/interfaces/Login/LoginWithGitHub.tsx b/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
similarity index 87%
rename from studio/components/interfaces/Login/LoginWithGitHub.tsx
rename to studio/components/interfaces/SignIn/SignInWithGitHub.tsx
index 169627fd616..ba9e81b28d3 100644
--- a/studio/components/interfaces/Login/LoginWithGitHub.tsx
+++ b/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
@@ -1,7 +1,7 @@
import { auth } from 'lib/gotrue'
import { Button, IconGitHub } from 'ui'
-const LoginWithGitHub = () => {
+const SignInWithGitHub = () => {
async function handleGithubSignIn() {
try {
const { error } = await auth.signInWithOAuth({
@@ -11,7 +11,7 @@ const LoginWithGitHub = () => {
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
? process.env.NEXT_PUBLIC_VERCEL_URL
: process.env.NEXT_PUBLIC_SITE_URL
- }/projects?auth=true`,
+ }/projects`,
},
})
if (error) throw error
@@ -27,4 +27,4 @@ const LoginWithGitHub = () => {
)
}
-export default LoginWithGitHub
+export default SignInWithGitHub
diff --git a/studio/components/interfaces/Login/RegisterForm.tsx b/studio/components/interfaces/SignIn/SignUpForm.tsx
similarity index 78%
rename from studio/components/interfaces/Login/RegisterForm.tsx
rename to studio/components/interfaces/SignIn/SignUpForm.tsx
index 7ec0e33fe88..eff331414da 100644
--- a/studio/components/interfaces/Login/RegisterForm.tsx
+++ b/studio/components/interfaces/SignIn/SignUpForm.tsx
@@ -5,21 +5,21 @@ import { useRouter } from 'next/router'
import { Button, Form, Input } from 'ui'
import { object, string } from 'yup'
-const registerSchema = object({
+const signUpSchema = object({
email: string().email('Must be a valid email').required('Email is required'),
password: string()
.required('Password is required')
.min(8, 'Password must be at least 8 characters long'),
})
-const RegisterForm = () => {
+const SignUpForm = () => {
const { ui } = useStore()
const router = useRouter()
- const onRegister = async ({ email, password }: { email: string; password: string }) => {
+ const onSignUp = async ({ email, password }: { email: string; password: string }) => {
const toastId = ui.setNotification({
category: 'loading',
- message: `Registering...`,
+ message: `Signing up...`,
})
const response = await post(`${API_URL}/signup`, { email, password, username: email })
@@ -29,10 +29,10 @@ const RegisterForm = () => {
ui.setNotification({
id: toastId,
category: 'success',
- message: `Registered successfully! Please confirm your email before logging in.`,
+ message: `Signed successfully! Please confirm your email before logging in.`,
})
- await router.push('/projects')
+ await router.push('/sign-in')
} else {
ui.setNotification({
id: toastId,
@@ -45,10 +45,10 @@ const RegisterForm = () => {
return (
<Form
validateOnBlur
- id="register-form"
+ id="signUp-form"
initialValues={{ email: '', password: '' }}
- validationSchema={registerSchema}
- onSubmit={onRegister}
+ validationSchema={signUpSchema}
+ onSubmit={onSignUp}
>
{({ isSubmitting }: { isSubmitting: boolean }) => {
return (
@@ -71,13 +71,13 @@ const RegisterForm = () => {
<Button
block
- form="register-form"
+ form="signUp-form"
htmlType="submit"
size="large"
disabled={isSubmitting}
loading={isSubmitting}
>
- Register
+ Sign Up
</Button>
</div>
)
@@ -86,4 +86,4 @@ const RegisterForm = () => {
)
}
-export default RegisterForm
+export default SignUpForm
diff --git a/studio/components/interfaces/Support/Success.tsx b/studio/components/interfaces/Support/Success.tsx
index 2f77cb8fb88..dcf4779a1c0 100644
--- a/studio/components/interfaces/Support/Success.tsx
+++ b/studio/components/interfaces/Support/Success.tsx
@@ -13,7 +13,7 @@ const Success = () => {
We will email you back using your GitHub email address
</p>
</div>
- <Link href="/">
+ <Link href="/projects">
<Button>Go back to dashboard</Button>
</Link>
</div>
diff --git a/studio/components/layouts/AccountLayout/AccountLayout.tsx b/studio/components/layouts/AccountLayout/AccountLayout.tsx
index dc3d2c746d7..87ce2e998a8 100644
--- a/studio/components/layouts/AccountLayout/AccountLayout.tsx
+++ b/studio/components/layouts/AccountLayout/AccountLayout.tsx
@@ -27,7 +27,8 @@ const AccountLayout: FC<Props> = ({ children, title, breadcrumbs }) => {
const onClickLogout = async () => {
await auth.signOut()
- localStorage.clear();
+ localStorage.clear()
+ await router.push('/sign-in')
router.reload()
}
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
index 40143e5ea1d..9a0887685ec 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/LayoutHeader.tsx
@@ -76,7 +76,7 @@ const LayoutHeader = ({ customHeaderComponents, breadcrumbs = [], headerBorder =
)}
</>
) : (
- <Link href="/">
+ <Link href="/projects">
<a
className={`cursor-pointer px-2 py-1 text-xs text-scale-1200 focus:bg-transparent focus:outline-none`}
>
diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
index cec263e8441..5f8da5de9bf 100644
--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
@@ -34,7 +34,7 @@ const NavigationBar: FC<Props> = ({}) => {
].join(' ')}
>
<ul className="flex flex-col space-y-2">
- <Link href={'/'}>
+ <Link href="/projects">
<a className="block">
<img
src="/img/supabase-logo.svg"
diff --git a/studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
similarity index 99%
rename from studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx
rename to studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
index c674638abb3..6a43d5ab2e9 100644
--- a/studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx
+++ b/studio/components/layouts/SignInLayout/ForgotPasswordLayout.tsx
@@ -26,7 +26,7 @@ const ForgotPasswordLayout = ({
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
<div className="flex w-full items-center justify-between md:w-auto">
- <Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/'}>
+ <Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/projects'}>
<a>
<Image
src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}
diff --git a/studio/components/layouts/LoginLayout/LoginLayout.tsx b/studio/components/layouts/SignInLayout/SignInLayout.tsx
similarity index 96%
rename from studio/components/layouts/LoginLayout/LoginLayout.tsx
rename to studio/components/layouts/SignInLayout/SignInLayout.tsx
index d51260c4b12..a3782e11aa0 100644
--- a/studio/components/layouts/LoginLayout/LoginLayout.tsx
+++ b/studio/components/layouts/SignInLayout/SignInLayout.tsx
@@ -6,20 +6,20 @@ import Image from 'next/image'
import Link from 'next/link'
import { PropsWithChildren } from 'react'
-type LoginLayoutProps = {
+type SignInLayoutProps = {
heading: string
subheading: string
showDisclaimer?: boolean
logoLinkToMarketingSite?: boolean
}
-const LoginLayout = ({
+const SignInLayout = ({
heading,
subheading,
showDisclaimer = true,
logoLinkToMarketingSite = false,
children,
-}: PropsWithChildren<LoginLayoutProps>) => {
+}: PropsWithChildren<SignInLayoutProps>) => {
const {
ui: { theme },
} = useStore()
@@ -39,7 +39,7 @@ const LoginLayout = ({
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
<div className="flex w-full items-center justify-between md:w-auto">
- <Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/'}>
+ <Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/projects'}>
<a>
<Image
src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}
@@ -124,4 +124,4 @@ const LoginLayout = ({
)
}
-export default observer(LoginLayout)
+export default observer(SignInLayout)
diff --git a/studio/components/layouts/WizardLayout.tsx b/studio/components/layouts/WizardLayout.tsx
index f52aaa691ec..1fbb272dc79 100644
--- a/studio/components/layouts/WizardLayout.tsx
+++ b/studio/components/layouts/WizardLayout.tsx
@@ -32,7 +32,7 @@ const Header: FC<any> = ({ organization, project }) => {
<div className="Breadcrumbs flex justify-between">
<div className="flex items-center text-sm">
<div className="flex items-center space-x-2">
- <Link href="/">
+ <Link href="/projects">
<a>
<img
src="/img/supabase-logo.svg"
diff --git a/studio/components/layouts/index.ts b/studio/components/layouts/index.ts
index 2bb08b38d79..d1c7bade749 100644
--- a/studio/components/layouts/index.ts
+++ b/studio/components/layouts/index.ts
@@ -13,8 +13,8 @@ import { WizardLayoutWithoutAuth } from './WizardLayout'
import VercelIntegrationLayout from './VercelIntegrationLayout'
import BillingLayout from './BillingLayout'
import LogsExplorerLayout from './LogsExplorerLayout/LogsExplorerLayout'
-import LoginLayout from './LoginLayout/LoginLayout'
-import ForgotPasswordLayout from './LoginLayout/ForgotPasswordLayout'
+import SignInLayout from './SignInLayout/SignInLayout'
+import ForgotPasswordLayout from './SignInLayout/ForgotPasswordLayout'
export {
ProjectLayoutWithAuth,
@@ -32,7 +32,7 @@ export {
VercelIntegrationLayout,
BillingLayout,
LogsExplorerLayout,
- LoginLayout,
+ SignInLayout,
ForgotPasswordLayout,
}
diff --git a/studio/components/ui/Error.tsx b/studio/components/ui/Error.tsx
index 5d4d6151b48..0ec01d2abbf 100644
--- a/studio/components/ui/Error.tsx
+++ b/studio/components/ui/Error.tsx
@@ -17,7 +17,7 @@ export default function EmptyPageState({ error }: any) {
</p>
</div>
<div className="flex items-center space-x-4">
- <Link href="/">
+ <Link href="/projects">
<a>
<Button>Head back</Button>
</a>
diff --git a/studio/components/ui/PageTelemetry.tsx b/studio/components/ui/PageTelemetry.tsx
index 966a886236f..b00f61f9be5 100644
--- a/studio/components/ui/PageTelemetry.tsx
+++ b/studio/components/ui/PageTelemetry.tsx
@@ -11,8 +11,6 @@ const PageTelemetry: FC = ({ children }) => {
const { ui } = useStore()
const { profile } = ui
- const isAuth = router.asPath && router.asPath.includes('auth=true')
-
useEffect(() => {
function handleRouteChange() {
handlePageTelemetry(profile)
@@ -32,15 +30,6 @@ const PageTelemetry: FC = ({ children }) => {
if (router.route === '/' && router.asPath === '/') {
handlePageTelemetry(profile)
}
- /**
- * remove auth param from callback url
- * to do: this causes an issue with sending two page views !
- *
- * author @mildtomato
- */
- if (isAuth) {
- router.replace('/?auth=true', '/')
- }
}, [])
const handlePageTelemetry = (profile?: User) => {
@@ -50,15 +39,6 @@ const PageTelemetry: FC = ({ children }) => {
*/
let referrer: string | undefined = document.referrer
- /**
- * When user is logging in for first time, callback url will contain param `signup=true`
- * If true, we will exclude the referrer, which will likely be `github.com` (or any other provider used in future)
- */
-
- if (isAuth) {
- referrer = undefined
- }
-
/**
* Send page telemetry
*
diff --git a/studio/hooks/misc/withAuth.tsx b/studio/hooks/misc/withAuth.tsx
index 355ff8275ca..6fe163e07e0 100644
--- a/studio/hooks/misc/withAuth.tsx
+++ b/studio/hooks/misc/withAuth.tsx
@@ -80,7 +80,7 @@ export function withAuth<T>(
to the login page if they are guaranteed (no token at all) to not be logged in. */}
<script
dangerouslySetInnerHTML={{
- __html: `if (!window.localStorage.getItem('${STORAGE_KEY}')) {window.location.replace('/?returnTo=' + encodeURIComponent(window.location.pathname + window.location.search + window.location.hash))}`,
+ __html: `if (!window.localStorage.getItem('${STORAGE_KEY}') && !window.location.hash) {window.location.replace('/?returnTo=' + encodeURIComponent(window.location.pathname + window.location.search + window.location.hash))}`,
}}
/>
</Head>
diff --git a/studio/lib/gotrue.ts b/studio/lib/gotrue.ts
index 2c1bda4fc4c..4ed1778d205 100644
--- a/studio/lib/gotrue.ts
+++ b/studio/lib/gotrue.ts
@@ -8,6 +8,7 @@ export const STORAGE_KEY = process.env.NEXT_PUBLIC_STORAGE_KEY || 'supabase.dash
export const auth = new GoTrueClient({
url: GOTRUE_URL,
storageKey: STORAGE_KEY,
+ detectSessionInUrl: true,
})
export const getAuthUser = async (token: String): Promise<any> => {
diff --git a/studio/next.config.js b/studio/next.config.js
index f665c791574..8389984f18f 100644
--- a/studio/next.config.js
+++ b/studio/next.config.js
@@ -36,28 +36,33 @@ const nextConfig = {
permanent: true,
},
{
- source: '/sign-up',
- destination: '/register',
+ source: '/',
+ destination: '/sign-in',
permanent: false,
},
{
- source: '/signup',
- destination: '/register',
+ source: '/register',
+ destination: '/sign-up',
permanent: false,
},
{
- source: '/sign-in',
- destination: '/',
+ source: '/signup',
+ destination: '/sign-up',
permanent: false,
},
{
source: '/signin',
- destination: '/',
+ destination: '/sign-in',
+ permanent: false,
+ },
+ {
+ source: '/login',
+ destination: '/sign-in',
permanent: false,
},
{
source: '/log-in',
- destination: '/',
+ destination: '/sign-in',
permanent: false,
},
]
diff --git a/studio/pages/404.tsx b/studio/pages/404.tsx
index 7f6ead08fe6..17f0131b0f2 100644
--- a/studio/pages/404.tsx
+++ b/studio/pages/404.tsx
@@ -24,7 +24,7 @@ const Error404: NextPage = ({}) => {
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
<div className="flex w-full items-center justify-between md:w-auto">
- <a href="/">
+ <a href="/projects">
<Image
src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}
alt="supabase"
@@ -53,7 +53,7 @@ const Error404: NextPage = ({}) => {
<p className="text-scale-1100">We couldn't find the page that you're looking for!</p>
</div>
<div className="flex items-center space-x-4">
- <Link href="/">
+ <Link href="/projects">
<a>
<Button size="small">Head back</Button>
</a>
diff --git a/studio/pages/500.tsx b/studio/pages/500.tsx
index 981f27fd7b1..a01bc3ee6c5 100644
--- a/studio/pages/500.tsx
+++ b/studio/pages/500.tsx
@@ -16,7 +16,7 @@ const Error500: NextPage = ({}) => {
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
<div className="flex w-full items-center justify-between md:w-auto">
- <a href="/">
+ <a href="/projects">
<Image
src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}
alt=""
@@ -36,7 +36,7 @@ const Error500: NextPage = ({}) => {
</p>
</div>
<div className="flex items-center space-x-4">
- <Link href="/">
+ <Link href="/projects">
<a>
<Button>Head back</Button>
</a>
diff --git a/studio/pages/forgot-password.tsx b/studio/pages/forgot-password.tsx
index 086743005e5..a54f141b78b 100644
--- a/studio/pages/forgot-password.tsx
+++ b/studio/pages/forgot-password.tsx
@@ -1,4 +1,4 @@
-import ForgotPasswordForm from 'components/interfaces/Login/ForgotPasswordForm'
+import ForgotPasswordForm from 'components/interfaces/SignIn/ForgotPasswordForm'
import { ForgotPasswordLayout } from 'components/layouts'
import Link from 'next/link'
import { NextPageWithLayout } from 'types'
@@ -14,8 +14,8 @@ const ForgotPasswordPage: NextPageWithLayout = () => {
<div className="mb-4">
<span className="text-scale-1000">Already have an account?</span>{' '}
- <Link href="/">
- <a className="underline hover:text-scale-1100">Login</a>
+ <Link href="/sign-in">
+ <a className="underline hover:text-scale-1100">Sign In</a>
</Link>
</div>
</>
diff --git a/studio/pages/join/index.tsx b/studio/pages/join/index.tsx
index c44e6729258..3381295990b 100644
--- a/studio/pages/join/index.tsx
+++ b/studio/pages/join/index.tsx
@@ -236,7 +236,7 @@ const JoinOrganizationPage = () => {
'items-center justify-center gap-8 px-5',
].join(' ')}
>
- <Link href="/">
+ <Link href="/projects">
<a className="flex items-center justify-center gap-4">
<img
src="/img/supabase-logo.svg"
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsx
index a19a5d656af..ad89474643c 100644
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@ -220,7 +220,7 @@ const Wizard: NextPageWithLayout = () => {
}
footer={
<div key="panel-footer" className="flex w-full items-center justify-between">
- <Button type="default" onClick={() => Router.push('/')}>
+ <Button type="default" onClick={() => Router.push('/projects')}>
Cancel
</Button>
<div className="items-center space-x-3">
diff --git a/studio/pages/new/index.tsx b/studio/pages/new/index.tsx
index 1f554aec8d1..290d515599b 100644
--- a/studio/pages/new/index.tsx
+++ b/studio/pages/new/index.tsx
@@ -65,7 +65,7 @@ const Wizard: NextPageWithLayout = () => {
}
footer={
<div key="panel-footer" className="flex w-full items-center justify-between">
- <Button type="default" onClick={() => router.push('/')}>
+ <Button type="default" onClick={() => router.push('/projects')}>
Cancel
</Button>
<div className="flex items-center space-x-3">
diff --git a/studio/pages/project/_/[[...routeSlug]].tsx b/studio/pages/project/_/[[...routeSlug]].tsx
index 05fd6583827..50063fb0b41 100644
--- a/studio/pages/project/_/[[...routeSlug]].tsx
+++ b/studio/pages/project/_/[[...routeSlug]].tsx
@@ -13,7 +13,7 @@ const Header: FC<Props> = () => {
return (
<div className="dark:border-dark border-b p-3">
<div className="flex items-center space-x-2">
- <Link href="/">
+ <Link href="/projects">
<a>
<img
src="/img/supabase-logo.svg"
diff --git a/studio/pages/reset-password.tsx b/studio/pages/reset-password.tsx
index 7af393493a7..5801048c121 100644
--- a/studio/pages/reset-password.tsx
+++ b/studio/pages/reset-password.tsx
@@ -1,4 +1,4 @@
-import ResetPasswordForm from 'components/interfaces/Login/ResetPasswordForm'
+import ResetPasswordForm from 'components/interfaces/SignIn/ResetPasswordForm'
import { ForgotPasswordLayout } from 'components/layouts'
import Link from 'next/link'
import { NextPageWithLayout } from 'types'
@@ -14,8 +14,8 @@ const ResetPasswordPage: NextPageWithLayout = () => {
<div className="mb-4">
<span className="text-scale-1000">Already have an account?</span>{' '}
- <Link href="/">
- <a className="underline hover:text-scale-1100">Login</a>
+ <Link href="/sign-in">
+ <a className="underline hover:text-scale-1100">Sign In</a>
</Link>
</div>
</>
diff --git a/studio/pages/index.tsx b/studio/pages/sign-in.tsx
similarity index 76%
rename from studio/pages/index.tsx
rename to studio/pages/sign-in.tsx
index 3d3a73f66d0..9425159199d 100644
--- a/studio/pages/index.tsx
+++ b/studio/pages/sign-in.tsx
@@ -1,6 +1,6 @@
-import LoginForm from 'components/interfaces/Login/LoginForm'
-import LoginWithGitHub from 'components/interfaces/Login/LoginWithGitHub'
-import { LoginLayout } from 'components/layouts'
+import SignInForm from 'components/interfaces/SignIn/SignInForm'
+import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'
+import { SignInLayout } from 'components/layouts'
import Connecting from 'components/ui/Loading'
import { auth } from 'lib/gotrue'
import Link from 'next/link'
@@ -11,12 +11,12 @@ import { NextPageWithLayout } from 'types'
// detect for redirect from 3rd party service like vercel, aws...
const isRedirectFromThirdPartyService = (router: NextRouter) => router.query.next !== undefined
-const LoginPage: NextPageWithLayout = () => {
+const SignInPage: NextPageWithLayout = () => {
const router = useRouter()
- const autoLogin = isRedirectFromThirdPartyService(router)
+ const autoSignIn = isRedirectFromThirdPartyService(router)
useEffect(() => {
- if (autoLogin) {
+ if (autoSignIn) {
const queryParams = (router.query as any) || {}
const params = new URLSearchParams(queryParams)
@@ -34,12 +34,12 @@ const LoginPage: NextPageWithLayout = () => {
}
}, [])
- return autoLogin ? (
+ return autoSignIn ? (
<Connecting />
) : (
<>
<div className="flex flex-col gap-5">
- <LoginWithGitHub />
+ <SignInWithGitHub />
<div className="relative">
<div className="absolute inset-0 flex items-center">
@@ -50,13 +50,13 @@ const LoginPage: NextPageWithLayout = () => {
</div>
</div>
- <LoginForm />
+ <SignInForm />
</div>
<div className="my-8 self-center">
<div>
<span className="text-scale-1000">Don't have an account?</span>{' '}
- <Link href="/register">
+ <Link href="/sign-up">
<a className="underline hover:text-scale-1100">Sign Up Now</a>
</Link>
</div>
@@ -65,14 +65,14 @@ const LoginPage: NextPageWithLayout = () => {
)
}
-LoginPage.getLayout = (page) => (
- <LoginLayout
+SignInPage.getLayout = (page) => (
+ <SignInLayout
heading="Welcome back"
subheading="Sign in to your account"
logoLinkToMarketingSite={true}
>
{page}
- </LoginLayout>
+ </SignInLayout>
)
-export default LoginPage
+export default SignInPage
diff --git a/studio/pages/register.tsx b/studio/pages/sign-up.tsx
similarity index 60%
rename from studio/pages/register.tsx
rename to studio/pages/sign-up.tsx
index b5f66a982fb..73e734b6a9f 100644
--- a/studio/pages/register.tsx
+++ b/studio/pages/sign-up.tsx
@@ -1,14 +1,14 @@
-import LoginWithGitHub from 'components/interfaces/Login/LoginWithGitHub'
-import RegisterForm from 'components/interfaces/Login/RegisterForm'
-import { LoginLayout } from 'components/layouts'
+import SignInWithGitHub from 'components/interfaces/SignIn/SignInWithGitHub'
+import SignUpForm from 'components/interfaces/SignIn/SignUpForm'
+import { SignInLayout } from 'components/layouts'
import Link from 'next/link'
import { NextPageWithLayout } from 'types'
-const RegisterPage: NextPageWithLayout = () => {
+const SignUpPage: NextPageWithLayout = () => {
return (
<>
<div className="flex flex-col gap-5">
- <LoginWithGitHub />
+ <SignInWithGitHub />
<div className="relative">
<div className="absolute inset-0 flex items-center">
@@ -19,12 +19,12 @@ const RegisterPage: NextPageWithLayout = () => {
</div>
</div>
- <RegisterForm />
+ <SignUpForm />
</div>
<div className="my-8 self-center">
<span className="text-scale-1000">Have an account?</span>{' '}
- <Link href="/">
+ <Link href="/sign-in">
<a className="underline hover:text-scale-1100">Sign In Now</a>
</Link>
</div>
@@ -32,10 +32,10 @@ const RegisterPage: NextPageWithLayout = () => {
)
}
-RegisterPage.getLayout = (page) => (
- <LoginLayout heading="Get Started" subheading="Create a New Account">
+SignUpPage.getLayout = (page) => (
+ <SignInLayout heading="Get Started" subheading="Create a New Account">
{page}
- </LoginLayout>
+ </SignInLayout>
)
-export default RegisterPage
+export default SignUpPage