Scenes required for getSessionToken

tera3
Shopify Partner
5 0 0

When using authenticatedFetch, is it not necessary to get the token from getSessionToken since it is sent with the SessionToken also set?

In order to make it available from anywhere, we have created the following Provider.

・SessionTokenProvider
・AuthFetchProvider

 

return (
<React.StrictMode>
<AppProvider i18n={{}}>
<SessionTokenProvider app={shopifyApp}>
<AuthFetchProvider fetchFunction={fetchFunction}>
<App />
</AuthFetchProvider>
</SessionTokenProvider>
</AppProvider>
</React.StrictMode>
);


I believe that authenticatedFetch will be granted automatically, so I do not need a SessionTokenProvider.
If it is necessary, I would like to know the scenario in which SessionToken is used.

Replies 0 (0)