Skip to content

add better-auth integration - #329

Open
stevekaliski-stripe wants to merge 1 commit into
mainfrom
stevekaliski-better-auth
Open

stevekaliski-stripe wants to merge 1 commit into
mainfrom
stevekaliski-better-auth

Conversation

@stevekaliski-stripe

Copy link
Copy Markdown
Contributor

No description provided.

@stevekaliski-stripe
stevekaliski-stripe force-pushed the stevekaliski-better-auth branch 3 times, most recently from e328a56 to d8a6a78 Compare September 17, 2026 19:59
@stevekaliski-stripe
stevekaliski-stripe marked this pull request as ready for review September 17, 2026 20:00
@stevekaliski-stripe
stevekaliski-stripe requested a review from a team as a code owner September 17, 2026 20:00
@stevekaliski-stripe
stevekaliski-stripe force-pushed the stevekaliski-better-auth branch 2 times, most recently from 4785492 to 5f67b2a Compare September 17, 2026 20:23
@stripe stripe deleted a comment from za098yytd-debug Sep 18, 2026
@stripe stripe deleted a comment from za098yytd-debug Sep 18, 2026
@stripe stripe deleted a comment from za098yytd-debug Sep 18, 2026

@bytaesu bytaesu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about exposing 2 plugin APIs?

await authClient.link.connect({
  callbackURL: "/settings",
});

await authClient.link.disconnect({
  accountId,
});

With current structure, connecting a Link wallet requires calling authClient.linkSocial(). The plugin could provide a clearer Link-specific API while reusing Better Auth existing OAuth flow internally.

  1. link.connect() would be a thin wrapper around linkSocial().
  2. link.disconnect() would be a dedicated endpoint that validates a fresh session, account ownership, and last-account protection, then revokes the Link refresh token and deletes the local account only after revocation succeeds.
    https://docs.stripe.com/agentic-commerce/link-cli/oauth#revoke-access

Comment thread packages/integrations/better-auth/src/index.ts
@stevekaliski-stripe
stevekaliski-stripe force-pushed the stevekaliski-better-auth branch 4 times, most recently from a4b7957 to d6ca887 Compare September 18, 2026 14:20
@stevekaliski-stripe
stevekaliski-stripe requested review from bytaesu and jlau-stripe and removed request for bytaesu September 18, 2026 14:38
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
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.

3 participants