简体   繁体   English

如何管理使用 AWS Amplify 身份验证创建的用户

[英]How to manage users created with AWS Amplify Authentication

I am attempting to build an AWS Amplify authentication page with Vue.js based on the following tutorial: https://dev.to/dabit3/how-to-build-production-ready-vue-authentication-23mk .我正在尝试根据以下教程使用 Vue.js 构建 AWS Amplify 身份验证页面: https://dev.to/dabit3/how-to-build-production-ready-vue-authentication-23mk I am configuring the profile.vue component to pass user information associated with the authenticated user to the template.我正在配置profile.vue组件以将与经过身份验证的用户关联的用户信息传递给模板。 In the tutorial, a method called Auth.currentAuthenticatedUser returns a user object containing metadata about the logged-in user.在本教程中,名为Auth.currentAuthenticatedUser的方法返回user object,其中包含有关登录用户的元数据。 This metadata is accessed by appending .username to name in the template.通过将.username附加到模板中的name来访问此元数据。 Here is an example of that component from the above tutorial with the Auth.currentAuthenticatedUser method:这是上述教程中使用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>

My question is: Which AWS service actually stores that user data once the user is created?我的问题是:创建用户后,哪个 AWS 服务实际存储了该用户数据? Is there a dashboard similar to Amplify or Cognito that is used to manage user information in the form of collections?是否有类似于 Amplify 或 Cognito 的仪表板用于管理 collections 形式的用户信息?

Since you are using Amplify and the auth class the aws-amplify npm package provides I believe the answer is you're already using Cognito.由于您使用的是 Amplify 和身份验证 class ,因此aws-amplify npm package 提供了我相信答案是您已经在使用 Cognito。 You should be able to view your users in Cognito already.您应该已经可以在 Cognito 中查看您的用户了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM