Skip to content

Better Auth community helper for ThunderID - #90

Closed
brionmario wants to merge 1 commit into
thunder-id:mainfrom
brionmario:feat/better-auth-provider-helper
Closed

Better Auth community helper for ThunderID#90
brionmario wants to merge 1 commit into
thunder-id:mainfrom
brionmario:feat/better-auth-provider-helper

Conversation

@brionmario

@brionmario brionmario commented Sep 2, 2026

Copy link
Copy Markdown
Member

Purpose

Adds @thunderid/better-auth, a community provider helper for Better Auth's Generic OAuth plugin. It returns a typed GenericOAuthConfig for a ThunderID issuer, so a Better Auth app can sign users in through ThunderID without any first-class provider support in Better Auth itself.

This follows the approach requested by the Better Auth maintainers after better-auth/better-auth#10237 (a first-class generic-oauth provider export) was declined per their social provider integration policy — they asked for a community provider helper package instead, to be listed in their docs.

Approach

thunderid() only supplies configuration — the callback route, discovery URL derivation, and scopes — for Better Auth's generic-oauth plugin. All OAuth 2.0 / OIDC handling (authorization, token exchange, callback handling) is performed by Better Auth itself, so there is no ThunderID SDK dependency or protocol logic to keep in sync.

The callback route registered with ThunderID is /callback/:providerId, not /oauth2/callback/:providerId — this matches the Generic OAuth plugin's actual core callback route, verified against a running sample app sign-in.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (README with install/usage/options docs and the callback URL to register)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards.
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: ae51933b-cbc9-4d5c-8515-67534dbe2de6


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brionmario brionmario changed the title feat(better-auth): add ThunderID provider helper for Generic OAuth plugin Add ThunderID provider helper for Generic OAuth plugin Sep 2, 2026
brionmario added a commit to brionmario/better-auth that referenced this pull request Sep 2, 2026
Adds ThunderID to the Community Provider Helpers table for the Generic
OAuth plugin, per better-auth#11059.

The @thunderid/better-auth package returns a typed GenericOAuthConfig
for a ThunderID issuer; all OAuth 2.0 / OIDC handling is performed by
Better Auth itself.

Related: thunder-id/thunderid#3559
See: thunder-id/javascript-sdks#90

Signed-off-by: Brion <info@brionmario.com>
@brionmario brionmario changed the title Add ThunderID provider helper for Generic OAuth plugin Better Auth community helper for ThunderID Sep 4, 2026
@brionmario
brionmario force-pushed the feat/better-auth-provider-helper branch from 02c4f2f to ea4081b Compare September 4, 2026 06:39
@brionmario
brionmario force-pushed the feat/better-auth-provider-helper branch from ea4081b to 9c1014d Compare September 4, 2026 07:06
Introduces @thunderid/better-auth, a community provider helper that returns a
typed GenericOAuthConfig for a ThunderID issuer to use with Better Auth's
generic-oauth plugin. All OAuth 2.0 / OIDC handling is performed by Better
Auth itself, so there is no ThunderID SDK dependency or protocol logic to
keep in sync.

The callback route registered with ThunderID is /callback/:providerId, not
/oauth2/callback/:providerId, matching the Generic OAuth plugin's core
callback route (verified against a running sample app sign-in).

Related: thunder-id/thunderid#3559

Signed-off-by: Brion <info@brionmario.com>
@brionmario
brionmario force-pushed the feat/better-auth-provider-helper branch from 9c1014d to 62781c7 Compare September 4, 2026 07:58
@brionmario brionmario closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant