Reputation: 1
I am building a server side app to periodically access information from users’ Google devices and notify them when certain criteria are met.
I have a few test users signed up, and they have gone through the Google oauth2 login. The app has received their auth code, requested offline access, and stored their refresh tokens in a separate DB location. The app then polls their smart devices periodically using the refresh token to obtain access as needed.
My problem is that the test users’ refresh tokens are expiring after a few days of use. I couldn’t find any documentation from Google about refresh token longevity. Is a few days normal for a refresh token to expire?
If so, my server side app will require user intervention way too often to be useful.
Upvotes: 0
Views: 284
Reputation: 1
https://developers.google.com/identity/protocols/oauth2#expiration
The sandbox tokens are good for a week but if your application is released officially then you can use the regular refresh tokens.
Upvotes: 0