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

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
50/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, typescript

调研方向

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.

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

描述

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.

主要语言
TypeScript
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

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

DeadantCo/answerLoopsdev 的其他 Issue

查看 DeadantCo/answerLoopsdev 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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