I am using the latest Shopify App Remix package but I have not been able to generate an offline token using the new embedded app authorization strategy.
Here’s what I’m currently doing:
Users installs the app
When the app is loaded and rendered (embed) I request some data using a form, which ends up calling an API.
The API calls the authenticate.admin(request) in order to generate a session token.
I notice that the accessToken generated always starts with shpua_, so I guess it’s not an offline access token.
I have tried using the oauth/access_token endpoint to generate an offline token but I always end up getting the following error:
Oauth error invalid_subject_token: Token exchange cannot be performed due to an invalid subject.
I call that endpoint with the following parameters:
I have also tried that, but when I call an API using the Ruby library or directly from Postman, if I include the token retrieved from admin.authenticated(request) I always end up getting this error:
{"errors":"[API] Invalid API key or access token (unrecognized login or wrong password)"}
That token starts with shpua_ so maybe it’s not an offline token at all weird stuff.