pocketbase-sveltekit-auth
pocketbase-sveltekit-auth copied to clipboard
Redirect login/register routes when already signed in
This PR adds functionality that will automatically redirect signed-in users going to /login
or register
to the home page /
.
To make this work, both routes are wrapped into (unauth)
named route and inherit a layout which will check the auth state on the server and maybe performs the redirect.
Feel free to reject/accept/modify, @jianyuan 😊