Provider-type check in the 2.7.0 evidence path is case-sensitive while preset resolution is not
Maintainers usually reply within 1 day
@heskew is already working on this.
Since Oct 1, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication
Research direction
Start in src/lib/handlers.ts around the 2.7.0 evidence path and compare its provider checks with case-insensitive resolution in src/lib/providers/index.ts and buildProviderConfig. Add a unit test for a provider value of 'GitHub' that produces emailProvenance 'github-authenticated' and check other config.provider comparisons for the same issue. Done means authenticated email evidence and account adoption work regardless of provider casing.
Written by the indexing model from the issue text.
Description
What happens
Provider presets resolve case-insensitively (getProvider() in src/lib/providers/index.ts: a config with provider: 'GitHub' picks the GitHub preset), but the 2.7.0 evidence path in src/lib/handlers.ts (~L458) decides the GitHub provenance with config.provider === 'github', case-sensitively. For a config whose provider is stored with any other casing, the authenticated /user/emails fetch still runs and sets the adapter provenance symbol, but emailProvenance stays 'unauthenticated' and emailAuthenticated is false.
Why it matters
- The built-in account-adoption gate then refuses to adopt an existing account for a genuine, verified GitHub login on such a config.
- An
onLoginhook that followsdocs/lifecycle-hooks.mdand gates onauthEvidence.emailAuthenticateddenies the login outright. Found this way: a consumer whose per-tenant provider configs storeprovider: 'GitHub'(preset resolution accepts it) would have started denying real GitHub logins the moment its hook adopted the documented check.
Verified by reading main @ the 2.7.0 release; not executed.
Expected
Every provider-type comparison in the evidence path uses the same normalization as preset resolution (lowercase once at config build time in buildProviderConfig, or compare with toLowerCase()), with a unit test for a 'GitHub'-cased config producing emailProvenance: 'github-authenticated'. Worth a sweep for other === 'github' / === 'google' comparisons against config.provider.
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 3
- Avg merge
- 7h 4m
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/oauth
-
Difficulty 4/5 3-5 days Newbie friendliness 53/100
HarperFast/oauth#284 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 69/100
HarperFast/oauth#283 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
HarperFast/oauth#280 ·
Maintainers usually reply within 1 day
-
Open-issue triage and roadmap (post-2.9.0)Possibly taken @heskew claimed this 21 days ago. Open
HarperFast/oauth#278 · 1 assignee ·
Maintainers usually reply within 1 day
-
Session docs overstate expiry: no default lifetime, and invalidation clears fields rather than deleting the rowPossibly taken @heskew claimed this 21 days ago. Open
HarperFast/oauth#277 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in HarperFast/oauth
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
oskarrough/dodgethis#115 ·
Maintainers usually reply within 1 day
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
external-plugin requires-submitter-fixes
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
github/awesome-copilot#5396 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
chenasraf/nextcloud-forum#348 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melodic-software/claude-code-plugins#9619 ·
Maintainers usually reply within 1 day