-
Notifications
You must be signed in to change notification settings - Fork 606
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
Making stores async #714
Making stores async #714
Conversation
Issue mainmatter#503 - Add optional client_id to OAuth2
Transition to ember-cli-build.js
…until emberjs/ember-mocha#48 is merged
fix authorizer example for ESA 1.0
The adaptive session store uses localStorage if it is available and if it is not automatically falls back to using cookies.
readme fix s/authentication/authorizer
This is great, thanks! I still think this can be merged without requiring a new major rebase though. Basically all that's needed is a method in the internal session that wraps all store access into a Promise if the store doesn't return a promise anyway. 1.0 has been delayed so much already it really needs to get released now. Of course making this PR work with non-async stores will require some work but I think it's worth it to not delay 1.0 any longer. Definitely going to merge this post 1.0 though! |
Alright, I'll add backward compatibility soon. Thanks for the help! |
thanks for the effort! |
} | ||
resolve(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to return a promise as well? It's actually synchronous and doesn't belong to the public API (which is only persist
, restore
, clear
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forget that - I see how it all makes sense now ;)
Should I open a new pr on master? |
yes please - thanks! |
Hi @marcoow,
Here is the pull request on #602 we discussed some time ago, to make stores async by default.
This will allow people to build stores that persist on asynchronous storage (like chrome app storage).
You mentioned that you would like to postpone this to release 1.1, but this change might be major, since everyone with a custom stores needs to adapt to the asynchronous workflow.