Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Replaced LoginForm with LoginPageContent for improved login handling and user experience. - Introduced ResetPasswordPage and ResetPasswordLayout components to facilitate password reset functionality. - Added new flow stages for authentication, including PasswordStage and SourceOAuthStage, to streamline user interactions. - Updated FlowChallengeForm to integrate new stages and improve error handling during authentication processes. - Refactored existing components to support the new authentication flow structure, enhancing maintainability and user experience.
28 lines
730 B
TypeScript
28 lines
730 B
TypeScript
"use client"
|
|
|
|
import { useSearchParams } from "next/navigation"
|
|
import { Suspense } from "react"
|
|
import { LoginPageContent } from "@/components/auth/login-page-content"
|
|
import { useNativeRuntime } from "@/lib/platform"
|
|
import { NativeLogin } from "@/components/mobile/native-login"
|
|
|
|
function LoginContent() {
|
|
const searchParams = useSearchParams()
|
|
const error = searchParams.get("error")
|
|
const returnTo = searchParams.get("returnTo") ?? "/mail/inbox"
|
|
|
|
if (useNativeRuntime()) {
|
|
return <NativeLogin returnTo={returnTo} />
|
|
}
|
|
|
|
return <LoginPageContent returnTo={returnTo} error={error} />
|
|
}
|
|
|
|
export default function LoginPage() {
|
|
return (
|
|
<Suspense fallback={null}>
|
|
<LoginContent />
|
|
</Suspense>
|
|
)
|
|
}
|