How can I customize auth in CLI app

This is the first time building a Shopify app so I used the CLI example to scaffold an app. Because Shopify limits functionality for custom apps, I need to create a public app and publish it to the app store. The problem is my app is not for broad distribution. So I plan on restricting access with custom auth logic. If the client who tries to download or log in to my app is not whitelisted, they will get an error message. How can I modify the default login and auth functions within the CLI scaffolded app?

Hi there :wave:

The authentication functions in the shopify-app-remix library provide auth that is suited for most public and custom apps.
For your special use case you may want to consider creating your own authentication methods that apply your custom logic and make sure they are called before the general authentication methods.

Otherwise you could fork the shopify-app-remix library to modify the authentication functions to suite your needs, but this may end up being harder to maintain going forward.

1 Like