[GH-ISSUE #1214] verifyIdToken with ctx arg #17276

Open
opened 2026-04-15 15:21:37 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @reslear on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1214

Originally assigned to: @ping-maxwell on GitHub.

Is this suited for github?

  • Yes, this is suited for github

No response

Describe the solution you'd like

verifyIdToken: async (token, nonce, ctx) => {
  const platform = ctx.headers.get('x-platform')
  if(platform === 'ios '){} // ... 
}

Describe alternatives you've considered

apple appBundleIdentifier as cb with ctx


appBundleIdentifier: (ctx) => {

}

Additional context

No response

Originally created by @reslear on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1214 Originally assigned to: @ping-maxwell on GitHub. ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like ```ts verifyIdToken: async (token, nonce, ctx) => { const platform = ctx.headers.get('x-platform') if(platform === 'ios '){} // ... } ``` ### Describe alternatives you've considered apple `appBundleIdentifier` as cb with ctx ```ts appBundleIdentifier: (ctx) => { } ``` ### Additional context _No response_
GiteaMirror added the oauth label 2026-04-15 15:21:37 -05:00
Author
Owner

@reslear commented on GitHub (Apr 22, 2025):

ok, like https://github.com/better-auth/better-auth/commit/57e2b8bd

<!-- gh-comment-id:2822600435 --> @reslear commented on GitHub (Apr 22, 2025): ok, like https://github.com/better-auth/better-auth/commit/57e2b8bd
Author
Owner

@dosubot[bot] commented on GitHub (Jul 22, 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:

  • You suggested enhancing the verifyIdToken function to include a ctx argument for accessing request headers like 'x-platform'.
  • An alternative approach using appBundleIdentifier as a callback with ctx was mentioned.
  • You referenced commit 57e2b8bd, indicating a potential solution or similar implementation.
  • The issue remains unresolved.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3103583846 --> @dosubot[bot] commented on GitHub (Jul 22, 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:** - You suggested enhancing the `verifyIdToken` function to include a `ctx` argument for accessing request headers like 'x-platform'. - An alternative approach using `appBundleIdentifier` as a callback with `ctx` was mentioned. - You referenced commit 57e2b8bd, indicating a potential solution or similar implementation. - The issue remains unresolved. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If no updates are provided, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Jul 22, 2025):

Not stale

<!-- gh-comment-id:3104764255 --> @reslear commented on GitHub (Jul 22, 2025): Not stale
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 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 adding a context (ctx) argument to the verifyIdToken function to access headers like 'x-platform'.
  • This would enable platform-specific verification logic, such as in callbacks like appBundleIdentifier.
  • You referenced commit 57e2b8bd as a related implementation.
  • The issue remains open and unresolved despite previous stale marking.
  • You have confirmed that the issue is still relevant.

Next Steps:

  • Please confirm if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If no further activity occurs within 7 days, I will automatically close the issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3427435319 --> @dosubot[bot] commented on GitHub (Oct 21, 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 adding a context (ctx) argument to the verifyIdToken function to access headers like 'x-platform'. - This would enable platform-specific verification logic, such as in callbacks like appBundleIdentifier. - You referenced commit 57e2b8bd as a related implementation. - The issue remains open and unresolved despite previous stale marking. - You have confirmed that the issue is still relevant. **Next Steps:** - Please confirm if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If no further activity occurs within 7 days, I will automatically close the issue. Thank you for your understanding and contribution!
Author
Owner

@reslear commented on GitHub (Oct 22, 2025):

Not stale

<!-- gh-comment-id:3432737759 --> @reslear commented on GitHub (Oct 22, 2025): Not stale
Author
Owner

@dosubot[bot] commented on GitHub (Jan 21, 2026):

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 adding a context (ctx) argument to the verifyIdToken function to enable access to headers like 'x-platform' for platform-specific verification logic.
  • This includes use cases such as in callbacks like appBundleIdentifier.
  • You referenced commit 57e2b8bd as a related implementation example.
  • The issue has been marked stale twice previously but you have confirmed it is still relevant.
  • The issue remains open and unresolved.

Next Steps

  • Please confirm if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, I will automatically close the issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3779268695 --> @dosubot[bot] commented on GitHub (Jan 21, 2026): 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 adding a context (ctx) argument to the verifyIdToken function to enable access to headers like 'x-platform' for platform-specific verification logic. - This includes use cases such as in callbacks like appBundleIdentifier. - You referenced commit 57e2b8bd as a related implementation example. - The issue has been marked stale twice previously but you have confirmed it is still relevant. - The issue remains open and unresolved. **Next Steps** - Please confirm if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, I will automatically close the issue. Thank you for your understanding and contribution!
Author
Owner

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

Not stale

<!-- gh-comment-id:3779991799 --> @reslear commented on GitHub (Jan 21, 2026): Not stale
Author
Owner

@ping-maxwell commented on GitHub (Mar 25, 2026):

Hello, I've assigned this issue to the 1.6.x milestone since I don't think it's too difficult to implement.
However this isn't a high priority issue so it could be rolled over to the next milestone depending on timelines & how busy things get.

<!-- gh-comment-id:4124734944 --> @ping-maxwell commented on GitHub (Mar 25, 2026): Hello, I've assigned this issue to the 1.6.x milestone since I don't think it's too difficult to implement. However this isn't a high priority issue so it could be rolled over to the next milestone depending on timelines & how busy things get.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#17276