As per the Shopify app requirement, you cannnot ask the user to enter their Shopify domain. All the installation process most be initiated within Shopify.
After a merchant clicks the link to install your app, your app receives a GET request on the app URL path that you specified in the Partner Dashboard. Requests to this URL path from a merchant who is logged into the Shopify App Store include the shop, timestamp, and hmac query parameters.
You need to flow the OAUTH authentication process as described by Shopify here.
- The merchant sends a request to install the app. (This sends a request to the App installation endpoint).
- App installation endpoint will then redirects the request to the Shopify admin API, with the required scopes, and a redirect_link.
- Then Shopify will show a prompt to the user to review the scopes and authorize the installation request.
- Then the Shopify admin API sends a request to the app.
- The app endpoint then validates the request from Shopify and sends a request back to Shopify admin API to get an access token.