Giter Site home page Giter Site logo

aws-cognito-web-starter's Introduction

AWS Cognito Web Starter

A simple starter project for using AWS-Cognito SDK in the web browser.

Try the Demo

About

This code takes the example code from the AWS Cognito JavaScript SDK, and implements it in the most simple way I know how: an HTML page with 1 JavaScript file. The purpose of this is to vet the service and API before implementing it in product.

./aws-cognito-web-starter/
├── LICENSE
├── index.css
├── index.html
└── index.js

Instructions

Checkout and Install

git clone [email protected]/f1lt3r/aws-congito-web-starter.git
cd aws-congito-web-starter
npm install

Serve Web Page (Optional)

Alternative: Try the Demo

npm install serve -g
serve

Open your browser to http://localhost:5000, or wherever you are serving your code.

Create your AWS Cognito User Pool

  1. Login into you AWS Console
  2. Create a Cognito User/Identity pool
  3. DO NOT ENABLE CLIENT SECRET WHEN CREATING YOUR POOL!
  4. Make sure email can be used as an alias (username)
  5. Take note of:
    • Pool Id: General Settings
    • App Client Id: App Integration > App Client Settings > ID
  6. Allow all custom attributes for this test

Follow the Forms

Follow the web forms from left to right.

  1. Configure your Pool and Client Ids
    • For convenience, these are saved in sessionStorrage and are deleted when you close your tab
  2. Sign up a user
  3. Confirm registration code sent to email
  4. Authenticate the user and receive access token

aws-cognito-web-starter's People

Contributors

f1lt3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.