Getting paid account on an unpaid user. #1499
Unanswered
MuhammadHussain-code
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I set the metadata to 'premium' and on one account I am getting 'premium' which should not be as that account never paid on the live mode however it does on the test mode.
const role = await getCustomClaimRole(false)
// role = 'premium' <----- getting this
export const getCustomClaimRole = async (boolean) => {
await auth?.currentUser?.getIdToken(true);
const decodedToken = await auth?.currentUser?.getIdTokenResult(boolean);
return decodedToken?.claims?.stripeRole;
}
Beta Was this translation helpful? Give feedback.
All reactions