Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
336 stars 99 forks source link

ShopAuthenticatedEvent is being fired when a shop is installed #251

Closed faridmovsumov closed 6 months ago

faridmovsumov commented 7 months ago

Context: This happens after uninstalling and installing the app again when the shop is in soft delete mode. In this case, ShopAuthenticatedEvent is being fired when a shop is installed, not when authenticated, and this is causing some problems.

This is how I defined the listener.

image

And this is the code inside my listener.

image

After uninstalling and installing the shop again, it is being fired before I actually see the permission screen on Shopify. So, at this point, my user has been soft-deleted from the DB.

And this is the log I see in the terminal.

image

faridmovsumov commented 6 months ago

I think I need to use the AppInstalledEvent event instead. Naming was confusing.