Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Latest commit

 

History

History
66 lines (41 loc) · 2.48 KB

File metadata and controls

66 lines (41 loc) · 2.48 KB

User Authentication with AWS Amplify and Cognito

Documentation

The code is a modification of the code from Serverless Stack. All credit goes to the people who built that awesome website: Frank Wang and Jay V.

Table of Contents

  1. Intro
  2. Demo
  3. Installation
  4. Usage
  5. Diagnosis

Intro

The app lets you:

  • Create an account with your email address.
  • Verify your account with AWS Cognito.
  • Login and logout.
  • Reset your password by sending a confirmation code to your email.

🚧 TODO:

  • User settings: change email, change password.
  • Code splitting for Router.

Main difference(s) between this app and the example on serverless-stack.com:

  • This app uses Bootstrap 4 with reactstrap instead of Bootstrap 3.

Demo

Installation

You need:

You don't need S3, Lambda, API Gateway or DynamoDB for this example.

Create a config.js file inside ./src that looks like ./src/config.js-example.

NOTE: It is ok to expose USER_POOL_ID, APP_CLIENT_ID and IDENTITY_POOL_ID as explained by AWS. If you want to secure API calls to the back-end (DynamoDB, S3, etc.), use API Gateway with Cognito, but that is out of the scope of this example.

Usage

You can use each component inside ./src/components for your app. Make sure you have all the dependencies required in each component.

You can also copy the whole ./src folder and use it as a standalone component to authenticate user for your app.

Diagnosis

Follow the guide on Serverless Stack website.

Author(s)

⬆ back to top