Hi Micah, thanks a lot for the clear article. I wanted to run the demo, but it failed when starting the Node.js application.
On Windows:
node.exe .\pkce-cli
C:\Git\pkce-cli\node_modules\restify\lib\request.js:848
Request.prototype.closed = function closed() {
^
TypeError: Cannot set property closed of # which has only a getter
at patch (C:\Git\pkce-cli\node_modules\restify\lib\request.js:848:30)
at Object. (C:\Git\pkce-cli\node_modules\restify\lib\server.js:32:1)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object. (C:\Git\pkce-cli\node_modules\restify\lib\index.js:10:14)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
Node.js v20.17.0
On WSL2 (Ubuntu):
./pkce-cli --client_id 0oahdifc72URh7rUV0h7 --okta_org https://micah.oktapreview.com --scopes “openid profile email” --redirect_uri http://localhost:8080/redirect
/home/thesse/Git/pkce-cli/node_modules/restify/lib/request.js:848
Request.prototype.closed = function closed() {
^
TypeError: Cannot set property closed of # which has only a getter
at patch (/home/thesse/Git/pkce-cli/node_modules/restify/lib/request.js:848:30)
at Object. (/home/thesse/Git/pkce-cli/node_modules/restify/lib/server.js:32:1)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object. (/home/thesse/Git/pkce-cli/node_modules/restify/lib/index.js:10:14)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
Node.js v18.19.1
What am I doing wrong? Thanks!