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
I'm implementing OIDC in a next.js project, but since this library uses window.location, I'm getting a window is not defined error on the initial server-side render.
I'm thinking adding something like
if (typeof window === 'undefined') return children;
in AuthProvider, and do nothing auth wise on the server-side render, and just let that happen in the subsequent client side render instead. Do you see any downsides with this, or a better solution, maybe something that would actually make it work server-side?
The text was updated successfully, but these errors were encountered:
Hi!
I'm implementing OIDC in a next.js project, but since this library uses window.location, I'm getting a
window is not defined
error on the initial server-side render.I'm thinking adding something like
in
AuthProvider
, and do nothing auth wise on the server-side render, and just let that happen in the subsequent client side render instead. Do you see any downsides with this, or a better solution, maybe something that would actually make it work server-side?The text was updated successfully, but these errors were encountered: