refactor(auth): inline NextAuth v4 config and simplify AuthPlatform API
- Inline NextAuth v4 handler directly in `[...nextauth]/route.ts`, removing
the `@/lib/auth/nextauth` abstraction layer
- Add Google/Facebook providers with JWT/session callbacks that expose
`idToken` and `accessToken` on the session for backend exchange
- Refactor `AuthPlatform` from constructor-based to static methods
(`googleSignIn()` / `facebookSignIn()`)
- Update `auth-machine.ts` and layout comment reference to match new structure
- Align with original Dart `nextauth-helpers.{googleLogin, facebookLogin}()`
naming and keep persistence concerns (unstorage, backend, custom cookies)
out of scope for this iteration
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
// suppressHydrationWarning:next/font + Tailwind v4 偶发类名差异;详见
|
||||
// `src/lib/auth/nextauth.ts` 的"水合闪屏"说明。
|
||||
// `src/app/api/auth/[...nextauth]/route.ts` 的"水合闪屏"说明。
|
||||
<html
|
||||
lang="en"
|
||||
suppressHydrationWarning
|
||||
|
||||
Reference in New Issue
Block a user