Refresh Token generic-oauth #1027

Closed
opened 2026-03-13 08:19:23 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @CodeWithAlexander on GitHub (Apr 13, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Add a generic-oauth provider
  2. Set authentication: "basic"
  3. Call /refresh-token endpoint

Current vs. Expected behavior

When calling refresh token the authentication method is not passed into the function imported from /oauth2
therefore it defaults to authentication: post

What version of Better Auth are you using?

1.2.6

Provide environment information

- OS: windows 11
- Browser: chrome

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)


Additional context

I think the fix would be to pass in authentication: c.authentication

Originally created by @CodeWithAlexander on GitHub (Apr 13, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Add a generic-oauth provider 2. Set authentication: "basic" 3. Call /refresh-token endpoint ### Current vs. Expected behavior When calling refresh token the authentication method is not passed into the function imported from /oauth2 therefore it defaults to authentication: post ### What version of Better Auth are you using? 1.2.6 ### Provide environment information ```bash - OS: windows 11 - Browser: chrome ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context I think the fix would be to pass in authentication: c.authentication
Author
Owner

@thisisleobro commented on GitHub (May 2, 2025):

Does this mean generic oauth2 tokens now can be renewed without aditional work?

@thisisleobro commented on GitHub (May 2, 2025): Does this mean generic oauth2 tokens now can be renewed without aditional work?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1027