This code results in my script “hanging”, the script doesn’t seem to end? It executes, and returns user information, but then just hangs. After I run this, I have to ctrl + c to get back to the terminal.
the file: index.js
calling it: node index.js
const okta = require('@okta/okta-sdk-nodejs');
const client = new okta.Client({
orgUrl: 'https://dev-1234.oktapreview.com/'
token: 'xYzabc' // Obtained from Developer Dashboard
});
client.getUser('foo@bar.com')
.then(user => {
console.log(user);
});