-
Notifications
You must be signed in to change notification settings - Fork 709
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
Store access scopes after successful OAuth #1192
Store access scopes after successful OAuth #1192
Conversation
Tophat of app with offline and online tokens: store-access-scopes-after-oauth.mov |
Tophatting for backwards compatibility where existing apps don't have access tokens defined on the Shop or User model. There should not be any access scopes stored. backwards-compatibility.mov |
21a5714
to
8b3cef4
Compare
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.
Non-blocking comments, code looks good!
Will test these changes locally again sometime today.
6cc34f6
to
9fad863
Compare
b458acb
to
3f3395c
Compare
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.
LGTM, comment is not a blocker
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.
LGTM
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.
LGTM!
We should roadmap future work to only support the new SessionStorage interface before a major release.
3f3395c
to
01893b1
Compare
…hScopes and UserSessionStorageWithScopes
01893b1
to
8babf78
Compare
Problem
Embedded apps using session tokens do not automatically handle changes in access scopes for offline and online tokens. In order to handle changes to access scopes requested, we need to store the access scopes after successfully completing OAuth flows.
What does this PR do?
On successful completion of OAuth, apps will now store the access scopes of an access token in
ShopifyApp::ShopSessionStorageWithScopes
andShopifyApp::UserSessionStorageWithScopes
.🎩 Tophatting
Go through OAuth for offline/shop tokens
access_scopes
with the expected valuesGo through OAuth for online/user tokens
access_scopes
with the expected valuesBefore submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersREADME.md
, if appropriate.docs/
, if necessary