expo-popcore-app/app
imeepos 24fd3a8847 feat: 完善认证系统
- 修复 Storage 层使用 AsyncStorage
- 统一 Token 存储键名为 bestaibest.better-auth.session_token
- 启用 401 自动跳转登录页并显示 Toast 提示
- 添加全局认证守卫(AuthGuard 组件)
- 修复 x-ownerid header 配置(从环境变量读取商户ID)
- 导出 loomart API 供活动数据使用

主要修改:
- lib/storage.native.ts: 新建,使用 AsyncStorage
- lib/storage.ts: 添加错误处理和注释
- lib/fetch-logger.ts: 统一 Token 键,启用 401 拦截
- lib/auth.ts: 导出 TOKEN_KEY,修复 x-ownerid,导出 loomart
- app/_layout.tsx: 添加 AuthGuard 组件实现路由守卫

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 16:00:02 +08:00
..
(tabs) fix: 登录页面 2026-01-13 15:55:52 +08:00
+not-found.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
_layout.tsx feat: 完善认证系统 2026-01-13 16:00:02 +08:00
auth.tsx fix: 登录页面 2026-01-13 15:55:52 +08:00
changePassword.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
channels.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
generateVideo.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
generationRecord.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
membership.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
modal.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
privacy.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
searchResults.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
searchTemplate.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
searchWorks.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
searchWorksResults.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
templateDetail.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
terms.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00
worksList.tsx Initial commit: expo-popcore-app 2025-12-25 16:25:55 +08:00