Three independent changes that together stop the mobile re-auth churn: - app/layout.tsx: add appleWebApp metadata so iOS "Add to Home Screen" launches Pulse in true standalone mode (own cookie jar, persists across Safari memory pressure) - components/auth/sign-in-form.tsx: when /auth/sign-in mounts and ?callbackUrl starts with /mobile, auto-call authClient.signIn.social for Microsoft. With an active M365 browser session this redirect is silent — the user lands on /mobile/* with no tap. - app/auth/sign-in/page.tsx: wrap SignInForm in <Suspense> (required by Next.js 16 because SignInForm now uses useSearchParams) Pairs with operator-side env bump SESSION_TIMEOUT_SECONDS=2592000 (30 days, .env files are gitignored — applied on the running container via docker compose up -d --force-recreate app). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
1,005 B
TypeScript
26 lines
1,005 B
TypeScript
import { Suspense } from "react";
|
|
import { SignInForm } from "@/components/auth/sign-in-form";
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
|
|
export default function SignInPage() {
|
|
return (
|
|
<Card className="border-0 shadow-2xl bg-white/95 dark:bg-slate-900/95 backdrop-blur">
|
|
<CardHeader className="space-y-1 text-center">
|
|
<div className="flex justify-center mb-4">
|
|
<div className="h-12 w-12 rounded-xl bg-gradient-to-br from-purple-600 to-blue-600 flex items-center justify-center">
|
|
<span className="text-2xl font-bold text-white">P</span>
|
|
</div>
|
|
</div>
|
|
<CardTitle className="text-2xl font-bold">Welcome to Pulse</CardTitle>
|
|
<CardDescription>
|
|
Sign in to your account to continue
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<Suspense fallback={null}>
|
|
<SignInForm />
|
|
</Suspense>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|