-
Notifications
You must be signed in to change notification settings - Fork 684
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
Add configuration option for user access scopes strategy #1599
Add configuration option for user access scopes strategy #1599
Conversation
test "user access scopes strategy is configurable" do | ||
my_strategy = Object | ||
ShopifyApp.configure do |config| | ||
config.user_access_scopes_strategy = my_strategy |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Updated to use a string.
d52ee48
to
af15eca
Compare
@@ -83,7 +83,17 @@ def shop_access_scopes_strategy | |||
ShopifyApp::AccessScopes::ShopStrategy | |||
end | |||
|
|||
def user_access_scopes_strategy=(class_name) | |||
unless class_name.is_a?(String) |
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.
Using a string to be consistent with user_session_repository
and shop_session_repository
.
Co-authored-by: Andy Waite <andyw8@users.noreply.github.com>
What this PR does
The gem currently provides two strategies for verifying user scopes:
Some apps (likely only first party apps made by Shopify) may have special requirements and need to use a different strategy. This PR adds a configuration option to allow that.
Reviewer's guide to testing
Reach out to me on Slack to discuss.
Things to focus on
Checklist
Before 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