feat: Add /login and /signup pages that initiate OAuth flow
This commit is contained in:
18
app/login/page.tsx
Normal file
18
app/login/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { initiateOAuthFlow } from '@/lib/api/oauth'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
|
||||
export default function LoginPage() {
|
||||
useEffect(() => {
|
||||
// * Immediately initiate OAuth flow when page loads
|
||||
initiateOAuthFlow()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<LoadingOverlay
|
||||
title="Redirecting to sign in..."
|
||||
/>
|
||||
)
|
||||
}
|
||||
19
app/signup/page.tsx
Normal file
19
app/signup/page.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { initiateOAuthFlow } from '@/lib/api/oauth'
|
||||
import LoadingOverlay from '@/components/LoadingOverlay'
|
||||
|
||||
export default function SignupPage() {
|
||||
useEffect(() => {
|
||||
// * Immediately initiate OAuth flow when page loads
|
||||
// * The auth service will handle showing signup vs login
|
||||
initiateOAuthFlow()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<LoadingOverlay
|
||||
title="Redirecting to sign up..."
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user