Skip to content

认证重构:Sign in with Apple + Google #6

@robinv8

Description

@robinv8

背景

从邮箱密码注册改为第三方认证。App Store 上架要求必须支持 Sign in with Apple。

任务

后端

  • POST /api/auth/apple — 验证 Apple ID Token,创建/查找用户,返回 JWT
  • POST /api/auth/google — 验证 Google ID Token,创建/查找用户,返回 JWT
  • 用户模型调整:移除 password 字段,新增 provider(apple/google)和 providerUserId
  • 移除旧的 register/login 端点

iOS

  • Sign in with Apple 按钮和流程(AuthenticationServices)
  • Google Sign-In SDK 集成
  • Token 存储到 Keychain
  • 登录状态恢复

注意

  • Apple 要求:如果提供第三方登录,必须同时提供 Sign in with Apple
  • Google Sign-In 需要在 Google Cloud Console 配置 OAuth Client

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1高优先级backend后端iosiOS 客户端

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions