Sign-in: add GitHub as a sign-in method

Aperta
#109 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, typescript

Direzione di ricerca

Start in lib/auth/providers.ts and follow how the Google entry is listed and wired into the auth configuration and sign-in action. Add a GitHub entry that is shown only when its client ID and secret are set, then update the example env file and the self-hosting docs under content/docs/. Done when the provider, action and login-form tests cover GitHub, an unconfigured provider id is rejected, and pnpm test and pnpm build pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend enhancement frontend

Copied from DeadantCo/answerLoops#99 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/455 — originally opened by @NathanTarbert on 2026-10-23

Problem

The sign-in page now reads its methods from the list in lib/auth/providers.ts (shipped in #371), but Google is the only entry. Developers and many self-hosters expect to sign in with GitHub, and people without a Google account cannot sign in at all.

Scope

  • Add a github entry to the provider list in lib/auth/providers.ts, listed only when its client ID and secret are set, so installs without them see no dead button.
  • Register the matching provider in the auth configuration and make sure new users go through the same account provisioning as the Google path.
  • Carry plan, billing period, promo code and the post-login destination through exactly as the Google path does.
  • Add the new environment variables to the example env file and the self-hosting docs under content/docs/, with a short setup walkthrough.
  • Cover the new entry in the existing provider, action and login-form tests.

Acceptance criteria

  • A GitHub button appears on /login only when its credentials are set, and signing in creates or finds the right user and organization.
  • Plan, interval, promo code and redirect survive the GitHub sign-in.
  • An unlisted or unconfigured provider id is rejected by the sign-in action.
  • Docs and the example env file describe the new variables.
  • pnpm test and pnpm build pass.

Related: #370, #371

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DeadantCo/answerLoopsdev

Tutte le issue di DeadantCo/answerLoopsdev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.