[Auth] Social login with Google and Apple

未关闭
#512 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
react-native, typescript

调研方向

Start with the auth code in backend/src/modules/auth/, mobile/src/contexts/auth/ and the login screens mobile/src/screens/Login.tsx and frontend/src/pages/Login.tsx, then find where Facebook login is wired in. Most acceptance criteria depend on external Google and Apple OAuth clients, store access and a blocking issue #514, so confirm those exist before writing code. Done means Google and Apple sign-in work in a TestFlight or Play internal build, verified-email accounts link to existing users, and Facebook login is removed.

由索引模型根据 Issue 内容生成。

描述

agent-ready back-end enhancement :rocket: mobile-app vic-2.0 web-app

Context

VIC 2.0 login is magic link + social login. No passwords and no Facebook login.

Scope:

  • Google sign-in on web, Android and iOS.
  • Sign in with Apple on iOS (required by App Store guideline 4.8 when Google login is offered), and on web if we want parity.
  • Social accounts are linked to the VIC account by verified email. Handle Apple's private relay emails ("Hide my email").
  • Built on VIC's own authentication (no Cognito). "Login with NGO Hub" stays exploratory as an extra provider.

Accounts and access we need

Owned by Commit Global, with access for the Tribus team:

Google

  • Google Cloud project (Commit Global org), with Owner or Editor access for us.
  • OAuth consent screen set up and published (app name, logo, privacy policy and terms URLs, authorized domains); Google verification if we request more than basic scopes.
  • OAuth client IDs: Web (redirect URIs for staging and production), iOS (bundle ID), Android (package name + SHA-1).
  • Google Play Console access, to read the SHA-1 of the Play App Signing key and the upload key.

Apple

  • Apple Developer Program team (Commit Global), with Admin role for us (or the Account Holder does the steps below).
  • App ID with the "Sign in with Apple" capability enabled.
  • Services ID for web sign-in, with the verified domain and return URLs (staging and production).
  • Sign in with Apple private key (.p8), plus its Key ID and the Team ID.
  • Private email relay: register the domain(s) we send email from (magic link, notifications), with SPF/DKIM, so emails reach "Hide my email" addresses.
  • App Store Connect access (App Manager) to submit the build and update the App Privacy details.

Other

  • Expo / EAS project access, to rebuild the apps with the new native config.
  • Place to store the secrets (Google client secret, Apple .p8 key) in the backend environments.

Design

Prototype: https://perch-pic-08148752.figma.site/ → Login. The prototype is indicative; this issue's text wins where they differ.

Acceptance criteria

  • Volunteers can sign in with Google (Android, iOS) and Apple (iOS) in the mobile app; web offers Google if enabled.
  • A social login with a verified email that matches an existing account signs into that account.
  • Apple "Hide my email" users can sign in and receive emails.
  • Facebook login is removed.
  • Works in TestFlight and Play internal builds (real OAuth clients, not Expo Go).

Dependencies

Phase 0. Blocked by #514.

Where to look

  • backend/src/modules/auth/
  • mobile/src/contexts/auth/
  • mobile/src/screens/Login.tsx
  • frontend/src/pages/Login.tsx
主要语言
TypeScript
星标
3
派生
2
平均合并
18 分钟
30 天内合并 PR
118

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

code4romania/vic 的其他 Issue

查看 code4romania/vic 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。