Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A sapper version would be nice too. #1

Open
quantuminformation opened this issue Nov 12, 2019 · 8 comments
Open

A sapper version would be nice too. #1

quantuminformation opened this issue Nov 12, 2019 · 8 comments

Comments

@quantuminformation
Copy link
Contributor

quantuminformation commented Nov 12, 2019

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
@babycourageous
Copy link
Owner

@quantuminformation I totally agree! I'll start drafting one up and let ya know when it's up if you like.

@quantuminformation
Copy link
Contributor Author

Cool, I'm not sure how you would pull it off with a static export though which is my use case for netlify.

@quantuminformation
Copy link
Contributor Author

quantuminformation commented Nov 14, 2019

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.

@quantuminformation
Copy link
Contributor Author

quantuminformation commented Nov 17, 2019

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

@babycourageous
Copy link
Owner

No sweat at all! Thanks for asking!

I don't have anything really besides my personal email.

@WeAreELIC
Copy link

Any update on a Sapper version?

@babycourageous
Copy link
Owner

@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.

@quantuminformation
Copy link
Contributor Author

its hard when your working to do open source, at least for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants