As a developer
I want to use the root as the app URL in Shopify
so that it follows the standards for static web application
What it is now
The Shopify app URL is /api/latest/oauth/authorize. When the app is loaded, it checks if the token is valid and redirects the user to the app root, where the home screen is shown. If the token is invalid it starts the oauth flow. That is an anti-pattern, since oauth/authorize should be used just to start the oauth flow.
What it should be
The Shopify app url should be /. When the app is loaded, it should check if the token is valid and redirect the user to the app root, where the home screen is shown. If the token is invalid it should redirect the user to /oauth/authorize which starts the oauth flow.
Technical details
Add the / route. In this route check if the token is valid and show the home screen. If not, redirect to oauth endpoint.
Acceptance criteria
Change app URL to the root path
After these changes the app can be installed/uninstalled without errors.
As a developer I want to use the root as the app URL in Shopify so that it follows the standards for static web application
What it is now
The Shopify app URL is /api/latest/oauth/authorize. When the app is loaded, it checks if the token is valid and redirects the user to the app root, where the home screen is shown. If the token is invalid it starts the oauth flow. That is an anti-pattern, since oauth/authorize should be used just to start the oauth flow.
What it should be
The Shopify app url should be /. When the app is loaded, it should check if the token is valid and redirect the user to the app root, where the home screen is shown. If the token is invalid it should redirect the user to /oauth/authorize which starts the oauth flow.
Technical details
Add the / route. In this route check if the token is valid and show the home screen. If not, redirect to oauth endpoint.
Acceptance criteria