pocketbase-sveltekit-auth icon indicating copy to clipboard operation
pocketbase-sveltekit-auth copied to clipboard

Redirect login/register routes when already signed in

Open devidw opened this issue 1 year ago • 0 comments

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 😊

devidw avatar Mar 01 '23 21:03 devidw