Tips #24 Create Amazon Cognito User Pool Xác Thực Ứng Dụng Trên AWS

## Tạo ứng dụng xác thực nhóm người dùng Amazon Cognito trên AWS

Amazon Cognito là một dịch vụ nhận dạng người dùng được quản lý giúp bạn dễ dàng thêm đăng ký người dùng, đăng nhập và kiểm soát truy cập vào các ứng dụng web và di động của bạn.Với Amazon Cognito, bạn có thể nhanh chóng và dễ dàng tạo nhóm người dùng mà bạn có thể sử dụng để xác thực người dùng và quản lý quyền truy cập của họ vào các ứng dụng của mình.

Trong hướng dẫn này, bạn sẽ tìm hiểu cách tạo nhóm người dùng Amazon Cognito và thêm xác thực vào một ứng dụng web đơn giản.

### Điều kiện tiên quyết

Để hoàn thành hướng dẫn này, bạn sẽ cần những điều sau đây:

* Tài khoản AWS
* Giao diện dòng lệnh AWS (AWS CLI)
* Một trình duyệt web

### Tạo nhóm người dùng Amazon Cognito

Để tạo nhóm người dùng Amazon Cognito, bạn có thể sử dụng bảng điều khiển quản lý AWS hoặc AWS CLI.Trong hướng dẫn này, bạn sẽ sử dụng AWS CLI.

Để tạo nhóm người dùng, hãy chạy lệnh sau:

`` `
AWS Cognito-idp Creat-user-pool--pool-name <
`` `

Lệnh này sẽ tạo một nhóm người dùng có tên `<-user-pool-name>`.Tham số `MFA Configuration` chỉ định rằng xác thực đa yếu tố là không cần thiết để người dùng đăng nhập.

### Thêm xác thực vào ứng dụng web

Để thêm xác thực vào ứng dụng web, bạn có thể sử dụng SDK nhóm người dùng Amazon Cognito cho JavaScript.SDK cung cấp API đơn giản mà bạn có thể sử dụng để đăng nhập người dùng, đăng xuất người dùng và quản lý các phiên người dùng.

Để thêm xác thực vào ứng dụng web của bạn, hãy làm theo các bước sau:

1. Cài đặt SDK nhóm người dùng Amazon Cognito cho JavaScript.
2. Tạo máy khách nhóm người dùng Cognito.
3. Thêm mã xác thực vào ứng dụng web của bạn.

Để biết thêm thông tin, hãy xem [Tài liệu nhóm người dùng Amazon Cognito] (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-protro.html).

### Bản tóm tắt

Trong hướng dẫn này, bạn đã học cách tạo nhóm người dùng Amazon Cognito và thêm xác thực vào một ứng dụng web đơn giản.Để biết thêm thông tin, hãy xem [Tài liệu nhóm người dùng Amazon Cognito] (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-protro.html).

## hashtags

* #Aws
* #Cognito
* #Authentication
* #UserPools
* #Ứng dụng web
=======================================
## Create Amazon Cognito User Pool authentication application on AWS

Amazon Cognito is a managed user identity service that makes it easy for you to add user sign-up, sign-in, and access control to your web and mobile applications. With Amazon Cognito, you can quickly and easily create a user pool that you can use to authenticate users and manage their access to your applications.

In this tutorial, you will learn how to create an Amazon Cognito user pool and add authentication to a simple web application.

### Prerequisites

To complete this tutorial, you will need the following:

* An AWS account
* The AWS Command Line Interface (AWS CLI)
* A web browser

### Create an Amazon Cognito user pool

To create an Amazon Cognito user pool, you can use the AWS Management Console or the AWS CLI. In this tutorial, you will use the AWS CLI.

To create a user pool, run the following command:

```
aws cognito-idp create-user-pool --pool-name <user-pool-name> --mfa-configuration "OFF"
```

This command will create a user pool with the name `<user-pool-name>`. The `mfa-configuration` parameter specifies that multi-factor authentication is not required for users to sign in.

### Add authentication to a web application

To add authentication to a web application, you can use the Amazon Cognito User Pool SDK for JavaScript. The SDK provides a simple API that you can use to sign in users, sign out users, and manage user sessions.

To add authentication to your web application, follow these steps:

1. Install the Amazon Cognito User Pool SDK for JavaScript.
2. Create a Cognito user pool client.
3. Add the authentication code to your web application.

For more information, see the [Amazon Cognito User Pool documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-intro.html).

### Summary

In this tutorial, you learned how to create an Amazon Cognito user pool and add authentication to a simple web application. For more information, see the [Amazon Cognito User Pool documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-intro.html).

## Hashtags

* #Aws
* #Cognito
* #Authentication
* #UserPools
* #webapplications
 
Join ToolsKiemTrieuDoGroup
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock