Renew Okta access_token

We are integrating Angular 1.x with Okta and implemented the custom solution using JavaScript. After authentication, I have id_token and access_token available(returned through the URL fragment after authentication). There is also JSESSIONID available as Cookie.

I need to renew/refresh access_token periodically using above available data. Looks like there is a way to use /authorize?prompt=none silently behind the scenes but couldn’t figure it out.

Thanks,
Nagaraj

Hi @cnagarao,

You’re correct - you can renew tokens by what is commonly referred to as “silent token renewal”. Our okta-auth-js SDK does this automatically for you, or you can use our helpful token.renew method.

If you’re wanting to do this yourself, you can see how we implemented it by using an invisible iframe here. This gets called by the renewToken method, mapped to token.renew.

Hope this helps!