-
Notifications
You must be signed in to change notification settings - Fork 626
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
Github Oauth: ember-simple-auth and/or torii? #1103
Comments
torii: the first difference that I've found was that in crates.io/app/routes/github-login.js Lines 4 to 16 in 88a505c
simple-auth: while working on simple-auth we realized that for server-side rendering to work for authenticated routes we could not store any data in localstorage and have to rely on cookies again. from looking at the current crates.io code it seems that we are using localstorage for this though. |
Something that makes me want to use ember-simple-auth is that it looks like it has really nice functions for doing auth in tests, which would be useful :P |
if using cookies instead of localstorage lets us use server-side rendering, i think that's a good tradeoff. I don't know of a particular reason why we're using localstorage. |
I have looked into this a bit more now and want to summarize my findings: current situation
|
What would you do for a brand-new SSR ember app that did oauth login to GitHub? This?
Or something else? I'm open to completely redoing this, if there's a more straightforward way of doing it. I just don't know what that way is 🤷♀ |
the one advantage that the I would most likely go for the way that I've described above and use an For the session token (just like the cookie now) there are basically three ways of generating the token:
my assumption right now is that we are currently doing the first of these in the cookie, but as I've said, I haven't dug that deep into that part. I would most-likely go for the third option here. it allows us to expire sessions that are no longer used and it would even give the user the opportunity to kill sessions that he does not recognize. we could e.g. save the IP and user-agent with the session and display them in a list in the login area. this would be roughly similar to what GitHub displays in the "Sessions" section on https://github.com/settings/security |
with the latest round of refactorings the OAuth code in the frontend has become a lot more manageable. I would still like to convert the |
From #204 (comment):
@Turbo87 do you know specifically what's different about how crates.io is doing github oauth and how torii expects it to work?
The text was updated successfully, but these errors were encountered: