feat: Add /login and /signup pages that initiate OAuth flow

This commit is contained in:
Usman Baig
2026-01-16 14:03:52 +01:00
parent 4e9cf59828
commit 51e6961a0c
2 changed files with 37 additions and 0 deletions

18
app/login/page.tsx Normal file
View 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
View 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..."
/>
)
}