Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Cleanup: identify and fix users affected by the id_token email-claim regression

オープン
#2,984 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rails, ruby

調査の方向性

Start by reading the issue's described fallback in lib/omniauth/strategies/codebar.rb and the listed cleanup queries; run the scans only after codebar/auth#83 is deployed. Keep emails and auth IDs in private ops notes, reporting counts and member IDs in the issue. Done means affected records are safely merged or re-keyed, members 31450 and 31452 are gone, no matching garbage records remain, and a magic-link sign-in resolves to the correct member.

索引モデルが issue の本文から書いたものです。

説明

The fix in codebar/auth#87 (PR codebar/auth#83) makes every id_token carry the user-record email and name claims. After it merges and deploys, the data damage from the regression still needs cleanup.

While the regression was live (auth release v64, 2026-10-02 10:01-16:34 UTC), a magic-link sign-in produced an id_token without an email claim. The codebar OmniAuth strategy fell back to sub (email = payload['email'] || payload['sub'] in lib/omniauth/strategies/codebar.rb) and created a planner member whose email and name were the better-auth user id: an empty account with no subscriptions or roles. Two such members are known: 31450 and 31452. Their users were dropped into the new-member flow as if they had never signed up. The rollback (v65) restored correct behaviour immediately: member 17284 has confirmed that sign-in works normally again. The window is therefore closed at 2026-10-02 16:34 UTC, and what remains is data cleanup.

1. Identify any affected users

  • Find planner members whose email is a better-auth user id: members created in the window whose email matches a 32-character opaque id, or whose email equals an auth user id directly.
  • Cross-check auth_service rows with provider codebar created in the window: a row whose uid has that same 32-character shape points at a garbage member.
  • detect_duplicate_members does not find these: the garbage member's email and name share nothing with the real member. Use the queries above, not the duplicate detector.
  • Keep the resulting user list out of this issue (emails and ids go in the private ops notes); report only counts and member ids here. Expected result: exactly 31450 and 31452 — earlier dump scans found no members of this shape before v64. The scan's real job is to confirm that and to catch anything the users created while stuck in the new-member flow.

2. Fix the identified users

For each affected user:

  1. If a real member exists (the usual case): merge anything the garbage member picked up (the user may have completed the new-member flow) into the real member, then delete the garbage member and its auth_service row. 17284 is confirmed already: their real member is intact and in use, so only the garbage member (31452) goes.
  2. If no real member exists (a genuinely new user who signed up during the window): re-key the member to the user's real email and name instead of deleting it.
  3. Confirm the user's next magic-link sign-in resolves to the same member. GitHub sign-ins already resolve via github_id and are unaffected.

Verification before closing

  • One magic-link sign-in resolves the real member on the fixed build (1.7.7 + explicit claims — different code path from the rollback that 17284 confirmed; member 17284 is the known case).
  • No member has an email equal to a better-auth user id, and no auth_service row has a codebar uid of that shape.
  • Members 31450 and 31452 are gone.

Timing: run this after codebar/auth#83 is deployed. Sign-ins after the fix can no longer create members of this shape.

主要言語
Ruby
スター
105
フォーク
206
平均マージ
1日 3時間
マージ済み PR(30日)
74

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codebar/planner のほかの issue

codebar/planner の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。