We use the youtube API on behalf of our users, but after 7 days some users report having to re-authenticate and generate new refresh and access tokens.
Our app is in production mode, so we are confused as to what is causing this?
async function authenticateURL(scopes, referringUrl) { const authUrl = oAuth2Client.generateAuthUrl({ access_type: 'offline', scope: scopes.join(''), prompt: 'consent', state: referringUrl }); return authUrl;}const scopes = ['https://www.googleapis.com/auth/youtube','https://www.googleapis.com/auth/userinfo.email'];Our solution at the moment is to email users and get them to re-authenticate. And we have tried changing up the scopes and toggling between test/production mode.