https://github.com/geeksven-dev/insomnia-plugin-cognito-auth
a simple env based insomnia plugin for cognito authentication
https://github.com/geeksven-dev/insomnia-plugin-cognito-auth
Last synced: about 1 month ago
JSON representation
a simple env based insomnia plugin for cognito authentication
- Host: GitHub
- URL: https://github.com/geeksven-dev/insomnia-plugin-cognito-auth
- Owner: geeksven-dev
- Created: 2019-08-15T08:14:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-10T08:00:19.000Z (about 4 years ago)
- Last Synced: 2024-08-01T21:55:52.189Z (10 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-repos - geeksven-dev/insomnia-plugin-cognito-auth - a simple env based insomnia plugin for cognito authentication (JavaScript)
README
### Setup
#### Files
Just put this src in your insomnia plugin folder and create a subfolder named as you like (e.g. 'cognito-auth') located at
`~/Library/Application Support/Insomnia/plugins`#### Environment
Create an environment in Insomnia and add the following params:
```
"username": "",
"password": "",
"userPoolId": "",
"clientId": "",
"host": "",
"intercept_auth": true
```
### How it works
On each request the plugin will intercept the execution and lookup for existing `accessToken` and `identityToken`in the
context store. If there is none that can be used a cognito authentication will be triggered via aws-amplify. On success
the header will be set.