gilleszunino / insomnia-plugin-azure-ad-authentication Goto Github PK
View Code? Open in Web Editor NEWInsomnia plugin to acquire Azure AD access tokens
License: MIT License
Insomnia plugin to acquire Azure AD access tokens
License: MIT License
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 for B2C would be incredibly helpful. Right now it's a very manual process to get tokens for usage in Insomnia.
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 @azure/[email protected]: The engine "node" is incompatible with this module. Expected version "10 || 12 || 14 || 16". Got "18.12.1"
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:
Navigate to the plugins folder
Perform a git clone https://github.com/GillesZunino/insomnia-plugin-azure-ad-authentication.git
cd .\insomnia-plugin-azure-ad-authentication\
Run npm run build:prod
Start Insomnia client
Reload all plugins (there's only this one)
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
The plugin errors unless it is set to http://127.0.0.1 but this is not accepted by the Azure App Registration blade which errors with "Must start with HTTPS or http://localhost message". However, the plugin does not allow the use of 'localhost'.
`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)`
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:
Navigate to the plugins folder
Perform a git clone https://github.com/GillesZunino/insomnia-plugin-azure-ad-authentication.git
cd .\insomnia-plugin-azure-ad-authentication\
Run npm run build:prod
Start Insomnia client
Reload all plugins (there's only this one)
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
This plugin would be a great combination with my keyvault-proxy, which I demoed here
The KeyVault Proxy allows a developer to securely use a Certificate stored in the KeyVault (using cloud sign), as a client credential.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.