-
Notifications
You must be signed in to change notification settings - Fork 687
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
Move covered scopes check into strategy #1600
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,7 @@ def activate_shopify_session | |
return redirect_to_login | ||
end | ||
|
||
unless current_shopify_session.scope.to_a.empty? || | ||
current_shopify_session.scope.covers?(ShopifyAPI::Context.scope) | ||
|
||
unless ShopifyApp.configuration.user_access_scopes_strategy.covers_scopes?(current_shopify_session) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember we saw another place where we did a similar check (callback controller?), we should make sure to use the same check in both cases for consistency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 This seem to be the only use of |
||
clear_shopify_session | ||
return redirect_to_login | ||
end | ||
|
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.
Just to illustrate what
covers?
does:See https://github.com/Shopify/shopify-api-ruby/blob/main/test/auth/auth_scopes_test.rb for details.