How to use refresh token with UserInfo and Sheets API

Currently my Chrome extension uses identity.getAuthToken() to handle authorization before calling GAPI. This works fine in Google Chrome, but my problems started when I tried to add support for Edge and Firefox, which do not support identity.getAuthToken() -- I have to rely on identity.launchWebAuthFlow() instead. My problem is that identity.launchWebAuthFlow() returns only the access token, which expires too quickly. This results in a bad UX because the user has to reauthenticate too frequently. Is there a way to use a refresh token instead?

12 0 104
0 REPLIES 0
Top Labels in this Space