@salte-auth/cognito
TypeScript icon, indicating that this package has built-in type declarations

3.0.10 • Public • Published

A Salte Auth provider for authenticating with Amazon's Cognito!

DocsDemo

NPM Version NPM Downloads CI Build Coveralls

semantic-release

Install

$ npm install @salte-auth/cognito

Usage

import { SalteAuth } from '@salte-auth/salte-auth';
import { Cognito } from '@salte-auth/cognito';
import { Redirect } from '@salte-auth/redirect';

/* 
 * Feel free to try out Salte Auth with this configuration!
 * 
 * It should work with the following domains:
 * - glitch.com
 * - localhost:8081
 */
const auth = new SalteAuth({
  providers: [
    new Cognito({
      responseType: 'token',
      url: 'https://salte-os.auth.us-east-1.amazoncognito.com',
      clientID: '5v4dilrda9p8cfo74gfvrc9hd4'
    })
  ],

  handlers: [
    new Redirect({
      default: true
    })
  ]
});

auth.login('cognito');

Package Sidebar

Install

npm i @salte-auth/cognito

Weekly Downloads

5

Version

3.0.10

License

MIT

Unpacked Size

10.3 kB

Total Files

16

Last publish

Collaborators

  • cecilia-sanare
  • davewoodward
  • salte-bot