verifyIdToken with ctx arg #562

Open
opened 2026-03-13 07:53:01 -05:00 by GiteaMirror · 7 comments
Owner

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

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). ### 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_
Author
Owner

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

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

@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!

@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

@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!

@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

@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!

@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

@reslear commented on GitHub (Jan 21, 2026): Not stale
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#562