sapper-authentication-demo
sapper-authentication-demo copied to clipboard
added protection for routes
I noticed your routes were not protected, just the in-template-ifs in the navigation menu. Added a way of protecting the routes both in the server and for clientside navigation. I had to add a redirect-function to polka as well. Also I ran 'npm audit fix'
Thanks for this. In the talk I mention a plugin I created for this purpose which is a cleaner way to do the same thing. How do you feel about us using the @beyonk/sapper-rbac plugin instead?
My feeling is that without the plugin, the code starts to become extremely complicated.
Ah, right! I’ll check that out.