
GarryC.05733 (Customer) asked a question.
I am creating a chrome extension and have added auth using Okta in the following way:
1) Download extension and hits the sign in button
2) the user is redirected to main site to login
3) the ID token and Access Token are sent back to the extension
The issue I am having is when the access token expires there is no way to get a new one as the there is no url bar for redirect within the extension and I dont want to load a page in the browser (I want it to happen silently)
I also work with Microsofts MSAL library and they allow for an iframe to generate the accessToken but as far as I can see it doesn't work from your side.. Even when switching on allow IFrame in the settings.
Any support would be great.
Thank you,
Garry

Hello,
An access token's life time is set to 1 hour. For you to be able to not loose the token you need to make an API call for the token to be refreshed.
I found a few link documentation that may help in renewing your access token below:
https://developer.okta.com/docs/guides/create-an-api-token/token-expiration-deactivation/
https://developer.okta.com/quickstart-fragments/widget/default-example/
https://github.com/okta/okta-auth-js
https://developer.okta.com/docs/guides/refresh-tokens/overview/
Also what I would suggest would be to submit something like Microsofts MSAL library on the Okta Community portal as a Feature Request / Idea.
Features suggested in our community are reviewed and can be voted and commented on by other members of the community,
therefore making it much easier for the engineering team to understand the priorities that you have for feature requests.
From there, the PM team will review the top 30 most voted upon ideas each month and provide feedback/roadmap status on these via the forum.