@salte-auth/cognito
v3.0.10
Published
A Salte Auth provider for authenticating with Amazon's Cognito!
Downloads
12
Readme
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');