netlify-identity-demo-svelte
netlify-identity-demo-svelte copied to clipboard
A sapper version would be nice too.
Advantages of Sapper:
- You don't need to store the token locally, you can use sessions which store to token on page hydration
- Local storage is considered to have weak security for access tokens
@QuantumInformation I totally agree! I'll start drafting one up and let ya know when it's up if you like.
Cool, I'm not sure how you would pull it off with a static export though which is my use case for netlify.
So I've been trying it with a sapper app and browser stuff is not available, so just to get things to work on sapper local dev I am trying stuff like:
function createUser() {
const localUser = process.browser
? JSON.parse(localStorage.getItem('gotrue.user'))
: undefined
anyway, looks like the best way to do this would be some http-only cookie getting the user on runtime vie a onMount method.
Do you mind if I make a mention of this repo in my youtube videos? btw do you have a contact email or smth?
Want to contrast it to SSR type authentication: https://www.youtube.com/playlist?list=PLCrwuqjmVebK08Cwz_XB55cNKFfFYOMGo
No sweat at all! Thanks for asking!
I don't have anything really besides my personal email.
Any update on a Sapper version?
@WeAreELIC I actually had this on my backburner but I haven't had a chance unfortunately.
I haven't grabbed Sapper in a while. Maybe this is a good reason to jog my memory. Sorry I don't have more of an update for ya.
its hard when your working to do open source, at least for me)