-
Notifications
You must be signed in to change notification settings - Fork 131
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
shopify app remix: how to hook into "install" event #2081
Comments
Hi there 👋
In the shopifyApp config object
After the package has stored the new access token it can trigger the ![]()
Something to note though that depending on your app setup this hook may be trigged at times other than initial install. It will be trigged whenever token exchange happens, e.g. you are using online access tokens, and one has expired. Allowing developer to hook into only the initial install event is something that we want to improve in the future. |
Thanks @lizkenyon for your inputs, however, even the afterAuth hook is not executed.
Added, restarted the remix app, uninsall the app, installed again, navigating between app pages, no log is displayed. BTW, since we are using future flag: |
If your app did not receive an uninstalled webook, (because your app was stopped, or your app url was changed since you last updated your webhook subscriptions), then your token may have still been in the database, and token exchange was not triggered. |
Indeed, thank you so much. I deleted the session token from the storage, and tried loading the app and i can see the log now.
Do you confirm? |
app created using shopify cli 3.74
I have
shopify.server.ts
where we define theauthPathPrefix
:And i have this
app/routes/auth.$.tsx
I expected
console.log("inside auth.$.tsx");
to be displayed at install time, but nothing.Where is shopify auth being done? Sorry .. too much hidden magic.
The text was updated successfully, but these errors were encountered: