supports outside auth like idToken but for e.g. access_token and etc.. #548

Closed
opened 2026-03-13 07:52:17 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @reslear on GitHub (Jan 11, 2025).

Is this suited for github?

  • Yes, this is suited for github
  1. pass full ctx and allow use headers for example fix https://github.com/better-auth/better-auth/issues/1214

  2. pass access_token to verifyIdTokenfor example https://github.com/better-auth/better-auth/pull/1078

Describe the solution you'd like

cc94e6a7c0/packages/better-auth/src/api/routes/sign-in.ts (L187-L188)

replace cb verifyIdToken to functions verify to and pass all token arguments c.body.idToken

Describe alternatives you've considered

  1. just add accessToken as 3-n param or all c.body.idToken:
const valid = await provider.verifyIdToken(token, nonce, accessToken);

Additional context

No response

Originally created by @reslear on GitHub (Jan 11, 2025). ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. 1. pass full `ctx` and allow use headers for example fix https://github.com/better-auth/better-auth/issues/1214 2. pass `access_token` to `verifyIdToken`for example https://github.com/better-auth/better-auth/pull/1078 ### Describe the solution you'd like https://github.com/better-auth/better-auth/blob/cc94e6a7c07c5742938a15e6e340d3dde3de17b3/packages/better-auth/src/api/routes/sign-in.ts#L187-L188 replace cb `verifyIdToken` to functions `verify` to and pass all token arguments `c.body.idToken` ### Describe alternatives you've considered 3. just add `accessToken` as 3-n param or all `c.body.idToken`: ```ts const valid = await provider.verifyIdToken(token, nonce, accessToken); ``` ### Additional context _No response_
Author
Owner

@dosubot[bot] commented on GitHub (Jun 12, 2025):

Hi, @reslear. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • Proposal to enhance Better Auth library to support external authentication methods.
  • Suggested changes include using access tokens, passing full context and headers, and modifying verifyIdToken.
  • No comments or developments have been made on this issue yet.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If there is no response, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jun 12, 2025): Hi, @reslear. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - Proposal to enhance Better Auth library to support external authentication methods. - Suggested changes include using access tokens, passing full context and headers, and modifying `verifyIdToken`. - No comments or developments have been made on this issue yet. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If there is no response, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Jun 12, 2025):

not outdated, everything would still be cool to pass ctx like
https://github.com/better-auth/better-auth/commit/57e2b8bd

@reslear commented on GitHub (Jun 12, 2025): not outdated, everything would still be cool to pass ctx like https://github.com/better-auth/better-auth/commit/57e2b8bd
Author
Owner

@dosubot[bot] commented on GitHub (Sep 11, 2025):

Hi, @reslear. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested enhancing Better Auth to support external authentication tokens beyond just idToken.
  • The proposal includes passing full context and headers to verification functions.
  • You suggested modifying verifyIdToken to a more flexible verify function.
  • You confirmed the request remains valid after the issue was marked stale previously.
  • No further developments or updates have occurred since your last confirmation.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I don’t hear back within 7 days, I will automatically close this issue.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Sep 11, 2025): Hi, @reslear. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested enhancing Better Auth to support external authentication tokens beyond just idToken. - The proposal includes passing full context and headers to verification functions. - You suggested modifying verifyIdToken to a more flexible verify function. - You confirmed the request remains valid after the issue was marked stale previously. - No further developments or updates have occurred since your last confirmation. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I don’t hear back within 7 days, I will automatically close this issue. Thanks for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Sep 11, 2025):

not outdated

@reslear commented on GitHub (Sep 11, 2025): not outdated
Author
Owner

@reslear commented on GitHub (Dec 9, 2025):

@Paola3stefania ?

@reslear commented on GitHub (Dec 9, 2025): @Paola3stefania ?
Author
Owner

@reslear commented on GitHub (Jan 3, 2026):

hi @Paola3stefania Could you explain the closure of the issue?

@reslear commented on GitHub (Jan 3, 2026): hi @Paola3stefania Could you explain the closure of the issue?
Author
Owner

@reslear commented on GitHub (Feb 3, 2026):

hi @Paola3stefania Could you explain the closure of the issue?

@reslear commented on GitHub (Feb 3, 2026): hi @Paola3stefania Could you explain the closure of the issue?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#548