Skip to main content

useGenerateUserToken

The useGenerateUserToken hook generates a temporary token for authenticating the current user with your backend. This token can be verified using the userTokenVerify mutation to obtain a permanent user identifier. See Verifying requests for implementation details.

Note

Some common use cases are: authenticating API requests to your backend, identifying users for personalized experiences, securely linking Shop users to your application's user database.

Note

This hook optionally uses the following scope(s) when declared in the manifest: openid

For more details, see manifest.json.

Anchor to useGenerateUserToken
useGenerateUserToken()


Was this page helpful?