GithubHelp home page GithubHelp logo

bluepeter / react-mobx-aws-cognito Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 308 KB

React.js with AWS Cognito for authentication and account scaffolding

License: MIT License

HTML 6.18% JavaScript 93.82%
aws-cognito reactjs mobx react-router-v4 react

react-mobx-aws-cognito's Introduction

React.js, MobX, AWS Cognito

This is an authentication-focused single page app starter/seed. This project adds AWS Cognito support for authentication. This greatly simplifies and speeds up app development as AWS handles all of the tedious back-end related authentication tasks. We used this seed ourselves to build the front-end for Fluxguard.

  • React.js and AWS Cognito integration to:
    • Create an account
    • Verify email address (via pin emailed to address)
    • Login
    • Logout
    • Verify existing session
    • Change password
    • Delete account
  • Includes react-bootstrap.
  • Check out package.json for more stack choices.

How to use

  • Clone this repo!
  • Go to the AWS console and create a new Cognito user pool. When you do this, review the default settings and make the following changes:
    • Change the sign-in method to "email address or phone number"
    • Uncheck "email" from required attributes
    • Require email verification (this is checked by default, so don't adjust it). You may need to create a new SMS role to allow AWS to send emails on your behalf.
    • Add an "app client" (note that creating one at the same time appears to be broken in the AWS console at this time, so you can create it immediately after the user pool is created)
      • When you create the app client, UNCHECK "generate client secret" as this project does not currently support this new-ish feature.
  • Copy the "Pool Id" and put it in .env
  • Click on "app client settings" and copy the "App client id" and put it in .env. Make sure "Cognito User Pool" is CHECKED under "Enabled Identity Providers".
  • Go to "app client settings" and check "Cognito user pool" under "enabled identity providers."
  • yarn to install everything
  • yarn run start to run locally.
  • Create an account, login, etc!

Screenshots

Screenshot

Screenshot

Screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.