Files
MonkeyCode/mobile/package.json
T
xiaomakuaiz 4a45c4b0dc feat: Sign in with Apple 登录 + 账号注销(App Store 4.8 / 5.1.1(v))
移动端:
- 登录页新增 Sign in with Apple(仅 iOS + 官方云),app.json 开启 usesAppleSignIn
- 个人页新增「注销账号」入口,两步确认后删号;导航交给鉴权守卫避免二次跳转
- AuthContext 增加 loginWithApple / deleteAccount;登录直接用接口返回的用户信息

后端:
- 新增 POST /api/v1/users/apple-login:JWKS 验签 identity token,按 Apple sub
  找/建用户;同邮箱(仅信任 token 验签的邮箱)则关联既有个人账号,避免撞唯一索引
- 新增 DELETE /api/v1/users/account:软删用户及第三方身份,撤销 Apple 授权
- pkg/applesign:JWKS 验签(读写锁 + 负缓存,刷新不阻塞登录)+ token 换取/撤销
- user_identities 增加 credential 字段(存 Apple refresh token)+ 迁移 000013
- apple-login 仅在配置了 client_id 时启用,私有化部署默认关闭
2026-06-12 21:07:07 +08:00

89 lines
2.5 KiB
JSON

{
"name": "monkeycode-mobile-expo",
"version": "1.0.0",
"description": "MonkeyCode 移动端(Expo / React Native 原生重构)",
"main": "expo-router/entry",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"lint": "expo lint",
"test": "jest"
},
"dependencies": {
"@expo/vector-icons": "^15.0.2",
"@noble/hashes": "^1.6.1",
"@react-native-async-storage/async-storage": "2.2.0",
"@shopify/flash-list": "2.0.2",
"expo": "^56.0.8",
"expo-apple-authentication": "~56.0.4",
"expo-asset": "~56.0.15",
"expo-blur": "~56.0.3",
"expo-build-properties": "~56.0.17",
"expo-clipboard": "~56.0.3",
"expo-constants": "~56.0.16",
"expo-file-system": "~56.0.7",
"expo-font": "~56.0.5",
"expo-image-manipulator": "~56.0.17",
"expo-image-picker": "~56.0.16",
"expo-linking": "~56.0.13",
"expo-media-library": "~56.0.6",
"expo-router": "~56.2.8",
"expo-sharing": "~56.0.15",
"expo-splash-screen": "~56.0.10",
"expo-status-bar": "~56.0.4",
"expo-system-ui": "~56.0.5",
"expo-updates": "~56.0.18",
"jest": "~29.7.0",
"punycode": "^2.3.1",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-gesture-handler": "~2.31.1",
"react-native-keyboard-controller": "1.21.6",
"react-native-live-audio-stream": "^1.1.1",
"react-native-markdown-display": "^7.0.2",
"react-native-nitro-modules": "^0.35.9",
"react-native-quick-crypto": "^1.1.5",
"react-native-reanimated": "4.3.1",
"react-native-safe-area-context": "~5.7.0",
"react-native-screens": "4.25.2",
"react-native-svg": "15.15.4",
"react-native-web": "^0.21.2",
"react-native-webview": "13.16.1",
"react-native-worklets": "0.8.3",
"react-test-renderer": "^19.2.7"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/jest": "^29.5.14",
"@types/node": "^25.9.1",
"@types/react": "~19.2.0",
"eslint": "^9.0.0",
"eslint-config-expo": "~56.0.4",
"typescript": "~6.0.3"
},
"private": true,
"expo": {
"doctor": {
"reactNativeDirectoryCheck": {
"exclude": [
"react-native-markdown-display",
"@noble/hashes"
],
"listUnknownPackages": false
}
}
},
"jest": {
"testEnvironment": "node",
"transform": {
"^.+\\.[jt]sx?$": "babel-jest"
},
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
}
}
}