Add Google Sign-In Authentication
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- authentication, backend, database, frontend, security
Direzione di ricerca
Start from the login page and the existing email/password auth flow, then check how GOOGLE_CLIENT_ID configuration is read. The work spans GET /api/auth/config, POST /api/auth/google with token verification, an oauth_identities table with a unique provider index, account-deletion cleanup, and the Cross-Origin-Opener-Policy header. Done means a Google sign-in creates or links a user, the button stays hidden without a Client ID, and failures are handled gracefully. This is multi-subsystem design work, so it suits a maintainer more than a first-timer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Add Google Sign-In to AlphaLearn using Google Identity Services, allowing users to authenticate with their Google accounts instead of relying only on the existing email and password login flow.
Proposed Implementation
Frontend
- Add a Continue with Google button to the login page.
- Display the Google Sign-In option only when
GOOGLE_CLIENT_IDis configured. - Integrate Google Identity Services to obtain the user's ID token.
- Reuse the existing authentication and redirect flow after successful login.
Backend
- Add
GET /api/auth/configto expose the public Google Client ID. - Add
POST /api/auth/googleto verify Google credentials and authenticate users. - Validate the token's signature, issuer, audience, expiration, and verified email claim.
- Link Google identities to existing accounts with the same email address.
- Store Google identity references using a hashed provider identifier rather than storing the raw Google subject.
- Apply rate limiting and handle authentication failures safely.
Database and Security
- Add an
oauth_identitiestable to associate external identities with AlphaLearn users. - Add an index on
user_idand enforce uniqueness for provider identities. - Clean up OAuth identity records when an account is deleted.
- Update the Cross-Origin-Opener-Policy header to support Google popup sign-in.
- Keep OAuth credentials out of source control.
Expected Behavior
- Users can sign in using Google from the login page.
- New users are registered automatically and redirected to the dashboard.
- Existing users can sign in through their linked Google identity.
- Existing accounts with matching email addresses are handled without creating duplicate accounts.
- Google Sign-In remains hidden when no Client ID is configured.
- Authentication failures are handled gracefully.
- Lingua principale
- HTML
- Stelle
- 3
- Fork
- 29
- Merge medio
- 2g 1h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alphaonelabs/learn
-
Password change returns 500 because `username` is used before it is setForse già presa @10done l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
alphaonelabs/learn#138 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Active Navigation State Is Not Highlighted in the NavbarForse già presa @Taha254511 l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alphaonelabs/learn#91 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
add edit an activity buttonForse già presa @gopikrishna-20 l’ha presa 6 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
alphaonelabs/learn#134 ·
I maintainer di solito rispondono entro 1 giorno
-
Add a "Resend verification email" option on the login pageForse già presa @gopikrishna-20 l’ha presa 9 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
alphaonelabs/learn#131 ·
I maintainer di solito rispondono entro 1 giorno
-
[Security] Use random salts for new password hashes, with backward-compatible migrationForse di nuovo libera @Taha254511 l’ha presa 9 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
alphaonelabs/learn#130 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di alphaonelabs/learn
Issue simili
-
bug P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Toloka/tolokaforge#1947 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strimzi/strimzi-kafka-operator#13328 · 1 commento · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
ready sonnet zone:app
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
wheresrhys/totf#1232 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100