Authentication using React hooks does not re-trigger beforeLoad
Hi, I use a react hook
This works well.
But, changes to the login state does not trigger a new
Is this to be expected?
I could of course trigger this behaviour myself on login/logout, redirecting from the login route to the index route or whatever. But I assumed this would happen automagically thanks to connecting the
Thanks!
useInternetIdentity to login the user and want to set that up so that the user identity is available in the router context. This works well.
But, changes to the login state does not trigger a new
beforeLoad on the route. When the login state changes because the user logs in or out, I can see the identity in <InnerRoot> update. But, this does not trigger a refresh of the route. Is this to be expected?
I could of course trigger this behaviour myself on login/logout, redirecting from the login route to the index route or whatever. But I assumed this would happen automagically thanks to connecting the
RouteProvider to the hook return values.Thanks!