Possible to create protected routes with Auth0 JS


I’m currently developing a custom login with Auth JS v9. I wonder if it is possible to protect routes?
I know you can calculated isAuthenticated based on the expiresIn property, but when logged in the authResult is still null and therefore expiresIn can’t be called and the isAuthenticated boolean remains false.

Any ideas, would help.

Thank you