Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script block not terminating? #86

Closed
adrwh opened this issue Jan 20, 2019 · 3 comments
Closed

Script block not terminating? #86

adrwh opened this issue Jan 20, 2019 · 3 comments

Comments

@adrwh
Copy link

adrwh commented Jan 20, 2019

This code results in my script “hanging”, the script doesn’t seem to end? It executes correctly and returns user information, but then just hangs. After I run this, I have to ctrl + c to get back to the terminal.

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);
});
@vvscode
Copy link

vvscode commented Jan 21, 2019

@vvscode
Copy link

vvscode commented Jan 21, 2019

const okta = require('@okta/okta-sdk-nodejs');
const MemoryStore = require('@okta/okta-sdk-nodejs/src/memory-store');

const client = new okta.Client({
  cacheStore: new MemoryStore({
    expirationPoll:null
  }),
  orgUrl: 'https://dev-160519.oktapreview.com',
  token: '00s8yW7KiYpCOFRc8USWZWS4FgvQPSrnRli9QFFzZG',    // Obtained from Developer Dashboard,
});

client.getUser('foo@bar.com')
.then(user => {
  console.log(user);
}).catch(console.error);

@nbarbettini
Copy link

Thanks for reporting this! We are already tracking it here: #45
We've prioritized the issue and will post an update there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants