-
Notifications
You must be signed in to change notification settings - Fork 0
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
Define Auth Methods #4
Comments
Now localStorage is not used at all actually. Auth methods save all data ( I want just show workflow with JWT, how it used now:
So if we want handle passing
Without that we forced to pass jwt explicitly:
Thouths, comments ? |
This is exactly the question!! First, I saw this https://github.com/FoxComm/firebird/blob/master/src/node_modules/modules/auth.js#L45 and just assumed we were using the value. My thinking was, one model could be that if The other model is to keep jwt in global app state, which would mean keeping auth at the higher layers... There are trade-offs here, the top-level app would re-implement a bunch of auth boilerplate that I'd love to abstract. What do you think are the options here? |
The other thing we could do process-wise is continue to be incremental: move just simple API calls down here for now, then as we explore the more complex separation of Storefront & Client we may find ourselves re-using patterns that will make this clear. |
I like that idea. In general we should figure out how solve |
Need to decide what we move from the auth module into this library.
Definitely API calls & URIs, but also JWT storage?
Q: should auth methods return JWT, or also deal with storing and retrieving jwt from local storage? I'm tempted to say it basically returns true/false and does all
localStorage
work for you.If we do want to make it super easy to use library, we should probably at least provide the option to have the library magically take care of this for the developer. That means actually calling
.then()
on thefetch
response. Is this cool? Possible? Do we need top-level methods forlogin
vssimpleLogin
so that developers can implement their own auth UX?The text was updated successfully, but these errors were encountered: