User Switching Issue:
- When switching from one Patreon user to another in my application, the app does not recognize the newly logged-in user. Instead, it continues to authenticate the previous user, even across different browsers.
- Testing with other OAuth providers (e.g., Google) works as expected, suggesting the issue is specific to the integration with Patreon.
- In clerk, the new user isn’t created.
Token and Session Behavior:
- The session ID changes correctly upon logging in and out, ruling out session caching as a cause.
- The behavior does not occur when logging in through email/password, further indicating a problem specific to the Patreon OAuth flow.
Debugging:
- Logging in with a second account and making an API call fails with a 401 error when the first account is logged out, even though the second user is authenticated in a different browser. The userId from auth() (“@clerk/nextjs/server”) is the userId of the first account.
Here is my oauth settings: