Search code examples
javascriptamazon-web-servicesvue.jsamazon-cognitoaws-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. I am configuring the profile.vue component to pass user information associated with the authenticated user to the template. In the tutorial, a method called Auth.currentAuthenticatedUser returns a user object containing metadata about the logged-in user. This metadata is accessed by appending .username to name in the template. Here is an example of that component from the above tutorial with the Auth.currentAuthenticatedUser method:

<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? Is there a dashboard similar to Amplify or Cognito that is used to manage user information in the form of collections?


Solution

  • 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. You should be able to view your users in Cognito already.