1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
1
You can't directly destructure it like you do with built-in attributes because of the colon in its name. Instead, access it using bracket notation. Here’s how you can do it:
const userAttributes = await fetchUserAttributes(); const category = userAttributes["custom:category"];
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos
I did it using : "const { tokens, credentials, identityId, userSub } = await fetchAuthSession(); const { idToken, accessToken } = tokens; idToken.payload['custom:category']" but I prefer your way. Thank you !