You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Return "this-is-the-session-token" from URL param
}
Those are used to obtain a valid session (ex: to perform shopify gql queries) via token-exchange. However, app proxy and webhooks do not provide a session-token to perform any Shopify queries. Instead, the keys are stored on outside databases:
This would be much easier if app-proxy and webhooks included a session-token that could be exchanged for an access-token. Or even better would be JWT / JWE. which would avoid the extra network calls altogether.
Additionally:
Pick a header name that can be used consistently (ex: request.headers.shopify-session-token). This would be better than sometimes the authorization header, sometimes a query parameter, and sometimes a separate header.
The text was updated successfully, but these errors were encountered:
Overview/summary
Currently shopify sends
session-token
as part of the authorization header, or in the query search parameters:shopify-app-js/packages/apps/shopify-api/docs/reference/auth/tokenExchange.md
Lines 28 to 39 in 037e5d8
Those are used to obtain a valid
session
(ex: to perform shopify gql queries) via token-exchange. However, app proxy and webhooks do not provide asession-token
to perform any Shopify queries. Instead, the keys are stored on outside databases:shopify-app-js/packages/apps/shopify-app-remix/src/server/authenticate/public/appProxy/authenticate.ts
Line 35 in 0c5501b
Also, app proxies have a contrived validation scheme (which itself caused other issues). It introduces a number of additional complications.
Enhancement
This would be much easier if app-proxy and webhooks included a
session-token
that could be exchanged for anaccess-token
. Or even better would be JWT / JWE. which would avoid the extra network calls altogether.Additionally:
Pick a header name that can be used consistently (ex:
request.headers.shopify-session-token
). This would be better than sometimes the authorization header, sometimes a query parameter, and sometimes a separate header.The text was updated successfully, but these errors were encountered: