GithubHelp home page GithubHelp logo

mauricedw22 / aws-cognito-js-login Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emmanuelmillionaer/aws-cognito-js-login

0.0 1.0 0.0 16 KB

Example app showing correct set up and usage of amazon-cognito-identity for js

License: MIT License

HTML 17.47% JavaScript 75.63% CSS 6.91%

aws-cognito-js-login's Introduction

aws-cognito-js-login

Shows correct set up and usage of https://github.com/aws/amazon-cognito-identity-js in a Demo Application. The Application allows a user to sign-up with different User-Atrributes. It can be used with MFA settings enabled.

Setup

First step: Clone this project and download the following Libraries to a folder named /dist:

  1. /dist/aws-cognito-sdk.min.js
  2. /dist/amazon-cognito-identity.min.js
  3. JavaScript BN library
  4. Stanford JavaScript Crypto Library

For more information about the dependencies click here


Second step: Go to the AWS Cognito User Pools and create a new User Pool: For the settings used in this application enable MFA and choose next to `email` as required attribute `phone number`.

When creating the Client app it's IMPORTANT to uncheck the generate client secret box. Because the JavaScript SDK doesn't support apps that have a client secret.


Third step: Go to AWS Cognito Federated Identites and create a new Identity Pool for your User Pool.

For your Identity Pool you can create a Authenticated role as well as a Unauthenticated role, where you can define what your users are allowed to do. For example reading from/uploading to S3.


Forth step: After you created all necessary AWS rescources, you need to reference them in your application. For that open the file `config.js` and edit the variables. The Ids like `identityPoolId` or `UserPoolId` you are able to see in the AWS Console.
Great, be your first user Open `index.html` in your browser and sign up for your client app.

This is what you will get:

Links

Article about Amazon Cognito in the Browser.

Here you can find the docs for Official amazon-cognito-identity-js

The kiwi background pattern can be found here

aws-cognito-js-login's People

Watchers

 avatar

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.