Model creation/update hook
I am building a shopify app, I want to connect it with another external api.
Basically my idea is to check the user in the external api by email and shopId and then persist in session an accessToken, so the user will be able to call this external api using the token.
I tought about doing in the react app when it renders I can just call a useEffect there, but I was wondering if I can hook to shopify oauth or session creation or update, to run this logic.
I know I can do it in the install action, but I believe that would only work for the user that installed the app and I want to be able to identify each user separately even if they are from the same shop.
0 Replies