I'm using chrome.identity.launchWebAuthFlow method to initiate a OAuth2 token generation from our OAuth2 server.
In the Identity API documentation, it is specified that to authenticate a user, there are two available methods: getAuthToken and launchWebAuthFlow. We use the latter because as specified in the documentation:
If your app uses its own server to authenticate users, you will need to use launchWebAuthFlow.
We're struggling to cache the results. When reading the documentation of getAuthToken, it seems that there is some smart-caching involved.
Chrome catches the response and store the access_token and renew_token in the browser (visible here: chrome://identity-internals/). Chrome requests for an access_token to the OAuth server only when the access_token is expired.
However, using launchWebAuthFlow, we're struggling to use the Chrome Cache, and it calls our OAuth server each time.
Does anyone know how to cache the result using this method of the API?