【问题标题】:How to manage users created with AWS Amplify Authentication如何管理使用 AWS Amplify 身份验证创建的用户
【发布时间】: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


【解决方案1】:

由于您使用的是 Amplify 和 auth class aws-amplify npm 包,我相信答案是您已经在使用 Cognito。您应该已经可以在 Cognito 中查看您的用户了。

【讨论】:

  • 感谢您的跟进。我已登录 AWS 上的 Cognito 服务,并且位于创建项目时生成的用户池环境中。我应该在此窗口中看到注册用户列表,对吗?我没有看到用户。
  • 再次感谢您的反馈。你愿意看看另一个 Vue.js/AWS-Amplify 问题吗? :stackoverflow.com/questions/59001855/…
猜你喜欢
  • 2020-01-01
  • 1970-01-01
  • 2021-03-17
  • 1970-01-01
  • 1970-01-01
  • 2020-10-20
  • 2019-02-11
  • 2021-04-08
  • 1970-01-01
相关资源
最近更新 更多