You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WE have a basic auth middleware in our application to protect staging environments. Implementing a component using the useUser-hook loses the the basic-auth-credentials (also having all failing 401 errors for every /auth/profile request in the console is annoying as hell).
Thank you for reporting this issue and providing a clear reproduction repository!
The useUser hook is making fetch requests without including the credentials: 'include' option, which means the basic auth credentials aren't being sent with subsequent requests.
Thanks for bringing this to our attention. We are working on the fix and make a release soon.
Checklist
Description
WE have a basic auth middleware in our application to protect staging environments. Implementing a component using the
useUser
-hook loses the the basic-auth-credentials (also having all failing 401 errors for every/auth/profile
request in the console is annoying as hell).Reproduction
user:pass
Additional context
This problem seems not to be directly tied to auth0 but SWR. When throwing an error from the SWR fetcher, Basic Auth headers are being lost.
nextjs-auth0 version
4.0.1
Next.js version
15.1.7
Node.js version
22.14.0
The text was updated successfully, but these errors were encountered: