最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon web services - Can not get the standard or custom attributes of current user - AWS Amplify Gen2 - Stack Overflow

programmeradmin2浏览0评论

I am developing an App using Vue3 and AWS Amplify Gen2.

After the user logged in, i want to show some information about the user on the screen, which is part of cognito user pool standard attributes.

I am using fethUserAttributes but it only contains the email of the user and nothing else

import {fetchUserAttributes} from 'aws-amplify/auth';
import outputs from '../../amplify_outputs.json';
import {Amplify} from "aws-amplify";

Amplify.configure(outputs);
const attributes = await fetchUserAttributes()
console.log("email", attributes.email);
console.log("name", attributes.name);
console.log("attributes", attributes);

And here what i get at the console:

Can you please help me pinpoint the problem?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论