Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Google auth refresh tokens expiring after a few days [duplicate]

$
0
0

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.

enter image description here


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>