The above documentation says the online access token is meant to be used when a user is interacting with the app. But what if the token is expired during the use of the app? Suppose the app redirects the user to OAuth flow and gets the token and redirects the user to the origin again, but isn't it a bad user experience?
the documentation also says:
[...] where the access token's lifespan matches the lifespan of the user's web session.
So I would expect that the access token will not expire as long as the user is interacting with your app and the Shopify session is active.
If you have an embedded app another way is using the session token. In that case, you only use the OAuth authentication after the first install or permission scope changes.
How does Shopify know the lifetime of the user's web session? Isn't the expiration date pre-determined when the app obtains the online access token after the OAuth flow?
Not only that, redirecting to the authorization page also does not work, has anyone encountered this problem?