5

I implemented a Laravel web-app with Google Drive's API used for storage. I used this tutorial https://gist.github.com/sergomet/f234cc7a8351352170eb547cccd65011. I note that in my application "refresh token" is expiring every 7 days and I don't know why. My application in Google developers console is in "test" mode.

2 Answers2

4

I found a response about your problem here: https://stackoverflow.com/a/65936387

In documentation https://developers.google.com/identity/protocols/oauth2#expiration there is writter:

A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.

so you have to try to publish it in "OAuth consent screen".

0

Here is some documentation on why Google refresh tokens may not work: https://developers.google.com/identity/protocols/oauth2/#expiration. You should factor in possible invalid tokens into your app.

user2705223
  • 1,219
  • 6
  • 10