Token exchange not triggered after app reinstall
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.9k
- Forks
- 739
- Avg merge
- 21h 2m
- Merged PRs (30d)
- 1
Description
I'm using token exchange auth and managed installs.
When I install the app for the first time - the new Shop record is created and ShopifyApp::Auth::TokenExchange is called.
When I re-install the app - the Shop record is already present in DB and ShopifyApp::Auth::TokenExchange not called automatically so shopify_token is not updated and post_authenticate_jobs are not called.
Expected behavior
ShopifyApp::Auth::TokenExchange should be called after app re-install.
Actual behavior
ShopifyApp::Auth::TokenExchange not called after re-install.
Demo
https://github.com/user-attachments/assets/8acbbaaf-a059-439a-87e7-79cc2e2599e5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ShopifyApp::Auth::TokenExchange entry point and the reinstall authentication flow described in the issue, then inspect how an existing Shop record is handled. Done means token exchange runs after reinstall, shopify_token is updated, and post_authenticate_jobs are called; add or update coverage for that behavior if the relevant tests are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100