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

await deleting the sessions on uninstall webhook #862

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

iphipps
Copy link
Contributor

@iphipps iphipps commented Oct 2, 2024

WHY are these changes introduced?

The afterAuth hook runs once on install. If a developer uninstalls and reinstalls, the afterAuth hook does not run because there is still a valid session. We need to properly await the deleting of sessions.

WHAT is this pull request doing?

Test this PR

shopify app init --template=https://github.com/Shopify/shopify-app-template-remix#iphipps\/invalidate-session-on-uninstall
  1. add a console log to an afterAuth hook in app/shopify.server.ts to see when it runs.
  2. notice how the afterAuth hook runs every time you install and uninstall the app on your store

Compare the behavior to main notice how afterAuth is run once.

Checklist

  • I have made changes to the README.md file and other related documentation, if applicable
  • I have added an entry to CHANGELOG.md
  • I'm aware I need to create a new release when this PR is merged

@iphipps iphipps requested a review from a team as a code owner October 2, 2024 13:25
@iphipps iphipps force-pushed the iphipps/invalidate-session-on-uninstall branch from f652121 to b19673d Compare October 2, 2024 14:49
@iphipps iphipps changed the title Invalidate the session on uninstall hook await deleting the sessions on uninstall webhook Oct 2, 2024
@lizkenyon lizkenyon merged commit ccea6a8 into main Oct 2, 2024
5 checks passed
@lizkenyon lizkenyon deleted the iphipps/invalidate-session-on-uninstall branch October 2, 2024 14:52
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
…install

await deleting the sessions on uninstall webhook
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.

2 participants