1.0.7 • Published 7 years ago
authenticate-cognito v1.0.7
this module cognito authenticate
The goal of the model is check if user that come from client is authenticated. This module use in amazon-cognito-identity-js-node .
Install
npm i authenticate-cognito
in app/Http/kernel.js add to :
- globalMiddleware App/Http/Middleware/Auth'
- namedMiddleware auth: 'App/Http/Middleware/Auth'
First we need add to .env file a few paremetes :
- REGION = ""
- USER_POOL_ID = ""
- CLIENT_ID = ""
Functions
Method | Parameters | desc |
---|---|---|
authenticate | idToken, refreshToken, accessToken | check if user authenticate ( it only for real user ) |
authenticateGuest | identityId | for guest |