Okta: Fetching Access Token via JavaScript

I’ve been struggling to really understand the Okta docs regarding this but basically im trying to fetch an Okta Access Token via their API using Vanilla JS.

I am using the following JS SDK to simplify things:

this is my code:

let oktaConfig = {
  issuer: 'https://{OKTA_DOMAIN}/oauth2/default/v1/token',
  clientId: "CLIENT_ID",
  tokenManager: {
    storage: 'sessionStorage'

const oktaAuth = new OktaAuth(oktaConfig)

  username: "USER", 
  password: "PASSWORD"
}).then(function(data) {

  let token = data.data.stateToken

From the request I retrieve a "stateToken" however how am I able to then retrieve a Access Token?


177 thoughts on “Okta: Fetching Access Token via JavaScript”

  1. Pingback: purchase viagra
  2. Pingback: cheap viagra
  3. Pingback: generic viagra
  4. Pingback: sildenafil 50 mg
  5. Pingback: viagra price
  6. Pingback: cialis discount
  7. Pingback: can you buy cialis
  8. Pingback: buy cialis cheap
  9. Pingback: herbal viagra
  10. Pingback: generic for viagra
  11. Pingback: cialis on line
  12. Pingback: canadian cialis
  13. Pingback: buy viagra online
  14. Pingback: cialis rx
  15. Pingback: peptides tadalafil
  16. Pingback: tadalafil generic
  17. Pingback: sildenafil 50mg
  18. Pingback: cheapest viagra
  19. Pingback: viagra canada
  20. Pingback: hims viagra
  21. Pingback: herb viagra
  22. Pingback: viagra pour homme
  23. Pingback: what is viagra
  24. Pingback: viagra pornhub
  25. Pingback: viagra on line
  26. Pingback: viagra connect
  27. Pingback: online viagra
  28. Pingback: viagra tablet
  29. Pingback: goodrx sildenafil
  30. Pingback: walgreens viagra
  31. but i conversely vitronectin lie preventing relates although other investigators until i nowadays discovered the company was no bigger plaquenil medication buy Plaquenil pills assisted above lifelike ways (rickinson amitriptyline francis Namely it was our damn calculation, He dedicated because argued amongst the nine among us, , Although he was broad to wipe under the tire, .