1回答
- 新しい順
- 投票が多い順
- コメントが多い順
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"];
関連するコンテンツ
- AWS公式更新しました 2年前
- AWS公式更新しました 1年前
- AWS公式更新しました 2年前
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 !