Hello,
I need clarification on the recent Shop Minis scopes update, because some of the wording is ambiguous and it affects backend implementation.
In the email, you wrote:
Any hook that returns consent-protected data (
useGenerateToken,useOrders, etc.) may return null if the user declines
I have a few specific questions:
- Did you mean
useGenerateUserTokeninstead ofuseGenerateToken? I cannot find a hook nameduseGenerateTokenin the docs. - When you say these hooks may return null, what is the exact rule? Do they always return null when the required scope is declined orr can they still return a value in some cases, depending on the hook?
- The docs for useGenerateUserToken say:
- it generates a temporary token for authenticating the current user with the backend
- it “optionally uses” the openid scope when declared in the manifest
What does “optionally uses” mean in precise runtime terms?
- If openid is present in the manifest but the user declines it:
- will useGenerateUserToken return null?
-or will it still return a token, but then userTokenVerify mutation will return publicId: null?
Right now the main uncertainty is where the failure happens. An explanation of the expected flow would help a lot.
Thank you.