refactor(auth): remove AuthGate abstraction in favor of useSession
- Drop AuthGate/AuthGateState re-exports from @/lib/auth/nextauth - Simplify SplashButton by removing skipHref prop and hardcoding ROUTES.chat - Update comments to reference useSession() (next-auth/react) directly instead of the AuthGate wrapper, since the auth UI gate no longer needs the extra abstraction layer.
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
* 重要约束:
|
||||
* - **不**做自定义 cookie 持久化:统一用 NextAuth 内置 `next-auth.session-token` /
|
||||
* `__Secure-next-auth.session-token`(v5 默认 httpOnly + secure)作信号。
|
||||
* - 真正的鉴权门在 Client 侧 `AuthGate.useState()`(用 `useSession()`),用于 UI 状态。
|
||||
* - 真正的鉴权门在 Client 侧 `useSession()`(next-auth/react),用于 UI 状态。
|
||||
* - 路由跳转(**唯一**鉴权跳转点)由本 proxy 集中处理。
|
||||
* - 副作用:邮箱登录用户(不走 NextAuth)不会被本 proxy 识别为已登录。
|
||||
* 邮箱登录在后续轮次若要恢复 proxy 行为,需引入 NextAuth EmailProvider 或独立
|
||||
|
||||
Reference in New Issue
Block a user