Skip to content
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

Fix InMemoryUserSessionStore - user.shopify_user_id does not exist #1716

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

zzooeeyy
Copy link
Contributor

What this PR does

Using ShopifyApp gem's InMemoryUserSessionStore doesn't work out of the box
nomethoderror

shopify_user_id does not belong in ShopifyAPI::Auth::AssociatedUser , using id instead.

Added test around InMemoryUserSessionStore as well.

Reviewer's guide to testing

Set configuration user session repository to use InMemoryUserSessionStore, see that it fails before this fix, and can store sessions after this fix.

# my-app/web/config/initializers/shopify_app.rb
ShopifyApp.configure do |config|
#...
  config.shop_session_repository = ShopifyApp::InMemoryShopSessionStore
  config.user_session_repository= ShopifyApp::InMemoryUserSessionStore
#...
end

Checklist

Before submitting the PR, please consider if any of the following are needed:

  • Update CHANGELOG.md if the changes would impact users
  • Update README.md, if appropriate.
  • Update any relevant pages in /docs, if necessary
  • For security fixes, the Disclosure Policy must be followed.

@zzooeeyy zzooeeyy force-pushed the zoey/fix-in-memory-user-session-store branch from c00126b to 2f0725f Compare August 22, 2023 19:33
Copy link
Contributor

@mllemango mllemango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@zzooeeyy zzooeeyy merged commit 6ec859b into main Aug 23, 2023
9 checks passed
@zzooeeyy zzooeeyy deleted the zoey/fix-in-memory-user-session-store branch August 23, 2023 20:21
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems October 12, 2023 14:27 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants