【发布时间】:2019-11-21 16:18:42
【问题描述】:
我正在尝试根据以下教程使用 Vue.js 构建 AWS Amplify 身份验证页面:https://dev.to/dabit3/how-to-build-production-ready-vue-authentication-23mk。我正在配置profile.vue 组件以将与经过身份验证的用户关联的用户信息传递给模板。在本教程中,名为Auth.currentAuthenticatedUser 的方法返回一个user 对象,其中包含有关登录用户的元数据。通过在模板中将.username 附加到name 来访问此元数据。以下是上述教程中使用 Auth.currentAuthenticatedUser 方法的该组件的示例:
<template>
<h1>Welcome, {{user.username}}</h1>
</template>
<script>
import { Auth } from 'aws-amplify'
export default {
name: 'Profile',
data() {
return {
user: {}
}
},
beforeCreate() {
Auth.currentAuthenticatedUser()
.then(user => {
this.user = user
})
.catch(() => console.log('not signed in...'))
}
}
</script>
我的问题是:创建用户后,哪个 AWS 服务实际存储了该用户数据?是否有类似于 Amplify 或 Cognito 的仪表板用于以集合的形式管理用户信息?
【问题讨论】:
-
问题解决了吗?
标签: javascript amazon-web-services vue.js amazon-cognito aws-amplify