Skip to content

A plugin for Insomnia that will extract a token from an OAuth2 token from a cookie, and refresh it if necessary.

License

Notifications You must be signed in to change notification settings

jpfifer/insomnia-plugin-cookie-auth-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insomnia Plugin for Auth Cookies

insomnia-plugin-cookie-auth is a plugin that allows extracting a specific cookie containing an oauth2 authorization token (or something containing an access_token field). It will detect if the cookie or token has expired and make send the request to retrieve an updated cookie or token.

Usage

This isn't published on NPM, so it needs to be manually installed.

  1. Clone the repository to the Insomnia plugins folder
    e.g. cd <insomnia plugins folder>; git clone <url>
  2. Install the dependencies
    • npm: npm install
    • yarn: yarn install
  3. Build it
    • npm: npm run-script build
    • yarn: yarn build
      This should produce: index.js
  4. Open Insomnia or tell it to reload plugins
  5. There should be a new template tag called Cookie Auth Token
  6. Provided the necessary configuration
    • Request: This is the which request the plugin should make if the token or cookie has expired
    • Cookie Domain: This is the domain name that the cookie that set the cookie.
      This is required as it's possible to have multiple cookies named the same.
    • The name of the cookie that will contain the access token.

About

A plugin for Insomnia that will extract a token from an OAuth2 token from a cookie, and refresh it if necessary.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published