Generic OAuth: User data in session storage not updated when overrideUserInfo is enabled. #1160

Closed
opened 2026-03-13 08:25:37 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @syeng-sr on GitHub (May 5, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Enable overrideUserInfo in the configuration for genericOAuth plugin
  2. Authenticate via an external OAuth provider
  3. Modify a user attribute in the OAuth provider
  4. Log out of the application
  5. Log in again using the same provider
  6. View session storage

Current vs. Expected behavior

Current:
When overrideUserInfo is enabled in the configuration for the genericOAuth plugin, user table is correctly updated after re-authentication. However, the session storage still contains outdated user data from the previous login.

Expected:
After logging in again, the session storage should reflect the updated user data retrieved from the OAuth provider.

What version of Better Auth are you using?

1.2.7

Provide environment information

- OS: macos
- Browser: chrome

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

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @syeng-sr on GitHub (May 5, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Enable overrideUserInfo in the configuration for genericOAuth plugin 2. Authenticate via an external OAuth provider 3. Modify a user attribute in the OAuth provider 4. Log out of the application 5. Log in again using the same provider 6. View session storage ### Current vs. Expected behavior Current: When overrideUserInfo is enabled in the configuration for the genericOAuth plugin, user table is correctly updated after re-authentication. However, the session storage still contains outdated user data from the previous login. Expected: After logging in again, the session storage should reflect the updated user data retrieved from the OAuth provider. ### What version of Better Auth are you using? 1.2.7 ### Provide environment information ```bash - OS: macos - Browser: chrome ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1160