Giter VIP home page Giter VIP logo

insomnia-plugin-azure-ad-authentication's Introduction

insomnia-plugin-azure-ad-authentication's People

Contributors

gilleszunino avatar zander-br avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

insomnia-plugin-azure-ad-authentication's Issues

Error when using the plugin `Error: RangeError: options.port should be >= 0 and < 65536. Received type number (NaN).`

When using the plugin I'm facing an error stating:

Error: RangeError: options.port should be >= 0 and < 65536. Received type number (NaN).

Disabling, or removing, the plugin solves the issue.

Because I couldn't install this plugin via the UI due to some npm-error, I cloned the repository in the plugins folder and built the plugin myself (tried both prod and dev builds).

Steps I have taken:

  1. Navigate to the plugins folder

  2. Perform a git clone https://github.com/GillesZunino/insomnia-plugin-azure-ad-authentication.git

  3. cd .\insomnia-plugin-azure-ad-authentication\

  4. Run npm run build:prod

  5. Start Insomnia client

  6. Reload all plugins (there's only this one)

  7. Configure a request to use the plugin
    Screenshot of the configured plugin with blurred values

  8. Invoke it and see the error.

I'm using the Postman callback URL over here because that one is already configured in our App Registration

module type error, ES modules vs CommonJS

`Error: require() of ES Module C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\node_modules@azure\msal-node\dist\index.js from C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\dist\index.js not supported.
C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\node_modules@azure\msal-node\dist\index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\node_modules@azure\msal-node\dist\index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\node_modules@azure\msal-node\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
at new NodeError (node:internal/errors:399:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1297:19)
at Module.load (node:internal/modules/cjs/loader:1124:32)
at Module._load (node:internal/modules/cjs/loader:965:12)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at o._load (node:electron/js2c/renderer_init:2:3109)
at Module.require (node:internal/modules/cjs/loader:1148:19)
at require (node:internal/modules/cjs/helpers:110:18)
at C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\dist\index.js:1:617
at Object.<anonymous> (C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\dist\index.js:1:50495)
at Object.<anonymous> (C:\Users\username\AppData\Roaming\Insomnia\plugins\insomnia-plugin-azure-ad-authentication\dist\index.js:2:3)
at Module._compile (node:internal/modules/cjs/loader:1269:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1324:10)
at Module.load (node:internal/modules/cjs/loader:1124:32)
at Module._load (node:internal/modules/cjs/loader:965:12)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at o._load (node:electron/js2c/renderer_init:2:3109)
at Module.require (node:internal/modules/cjs/loader:1148:19)
at require (node:internal/modules/cjs/helpers:110:18)
at q$ (file:///C:/Users/username/AppData/Local/insomnia/app-2023.5.7/resources/app.asar/index-7770d3c9.js:57:7484)
at $C (file:///C:/Users/username/AppData/Local/insomnia/app-2023.5.7/resources/app.asar/index-7770d3c9.js:57:8229)
at async u (file:///C:/Users/username/AppData/Local/insomnia/app-2023.5.7/resources/app.asar/index-7770d3c9.js:193:33449)`

Unclear of insomnia version

It's unclear what insomnia version is needed to use this plugin

This gets an error loading plugin with 2023.5.8 around not finding a valid index.js

Error when using the plugin, `Error: RangeError: options.port should be >= 0 and < 65536. Received type number (NaN).`

When using the plugin I'm facing an error stating:

Error: RangeError: options.port should be >= 0 and < 65536. Received type number (NaN).

Disabling, or removing, the plugin solves the issue.

Because I couldn't install this plugin via the UI due to some npm-error, I cloned the repository in the plugins folder and built the plugin myself (tried both prod and dev builds).

Steps I have taken:

  1. Navigate to the plugins folder

  2. Perform a git clone https://github.com/GillesZunino/insomnia-plugin-azure-ad-authentication.git

  3. cd .\insomnia-plugin-azure-ad-authentication\

  4. Run npm run build:prod

  5. Start Insomnia client

  6. Reload all plugins (there's only this one)

  7. Configure a request to use the plugin
    Screenshot of the configured plugin with blurred values

  8. Invoke it and see the error.

I'm using the Postman callback URL over here because that one is already configured in our App Registration

Unable to install 0.0.15 from Insomnia

Version: Insomnia 2023.4.0
Build date: 7/4/2023
OS: Windows_NT x64 10.0.19044
Electron: 23.3.9
Node: 18.12.1
V8: 11.0.226.20-electron.0
Architecture: x64

Was able to install and run version 0.0.14 and I am able to install other plugins from npmjs.com with only this plugin failing. The error message is:

Error: Error invoking remote method 'installPlugin': Error: Yarn error warning insomnia-plugin-azure-ad-authentication > http-terminator > roarr > fast-json-stringify > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

    at a.invoke (node:electron/js2c/renderer_init:2:7656)
    at async onSubmit (file:///C:/Users/xxxxxx/AppData/Local/insomnia/app-2023.4.0/resources/app.asar/index.70d0495f.js:190:488)

Support B2C

Support for B2C would be incredibly helpful. Right now it's a very manual process to get tokens for usage in Insomnia.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.