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

Use offline tokens #24

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Use offline tokens #24

merged 3 commits into from
Jul 8, 2022

Conversation

paulomarg
Copy link
Contributor

WHY are these changes introduced?

Current guidance is to prefer offline to online session tokens

WHAT is this pull request doing?

  • Configure shopify_app to use offline tokens (no User model / session repository)
  • Remove GraphQL proxy capability (requires online session tokens)
  • Change /api/products-count to /api/products/count (aligned with change in frontend)
  • Add /api/products/create endpoint for frontend (FE previously used GraphQL proxy)

@paulomarg paulomarg force-pushed the use_offline_tokens branch 2 times, most recently from 049828d to 33322d9 Compare July 7, 2022 15:41
@@ -14,7 +14,6 @@
config.after_authenticate_job = false
config.api_version = ShopifyAPI::AdminVersions::LATEST_SUPPORTED_ADMIN_VERSION
config.shop_session_repository = "Shop"
config.user_session_repository = "User"
Copy link
Contributor

Choose a reason for hiding this comment

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

Will shopify_app work without a configured user session repository?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, as per the docs, adding a user_session_repository is what makes the gem use online tokens.

@mkevinosullivan
Copy link
Contributor

LGTM! 🚢

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