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

Update access scopes in DB from app_scopes_update webhook subscription #151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zzooeeyy
Copy link
Contributor

@zzooeeyy zzooeeyy commented Oct 30, 2024

WHY are these changes introduced?

Closes: https://github.com/Shopify/develop-app-runtime-primitives/issues/387
Relates to: Shopify/shopify-app-template-remix#875

WHAT is this pull request doing?

  • Add new webhook subscription for app_scopes_update
  • Add controller & job to handle app_scopes_update webhook to update the DB's access_scopes column

Tophatting:

  1. Init new app from template
shopify app init --template=https://github.com/Shopify/shopify-app-template-ruby#zoey/subscribe-scope-update-webhook
  1. Create and install new app on a store
  2. See a record in shop DB for the installed shop
  3. Update shopify.app.toml to include different scopes
  4. Reload the app and approve newly requested scopes
  5. See the webhook request and the DB column is updated for the app.

https://screenshot.click/30-52-obkwf-t5j34.mp4

Checklist

Note: once this PR is merged, it becomes a new release for this template.

  • I have added/updated tests for this change
  • I have made changes to the README.md file and other related documentation, if applicable

@zzooeeyy zzooeeyy requested a review from a team as a code owner October 30, 2024 17:54
web/app/jobs/app_scopes_update_job.rb Outdated Show resolved Hide resolved
@zzooeeyy zzooeeyy force-pushed the zoey/subscribe-scope-update-webhook branch from acdb96b to 4d849c2 Compare October 30, 2024 21:36
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.

3 participants