flysystem-google-drive
flysystem-google-drive copied to clipboard
Invalid Credentials (refresh token not working)
When i uploading for two hours, i mean i pushed 10 jobs in laravel to upload some files in different times, the first hour is ok and after that i will get :
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
I did exactly what was said in this article , i checked the "auto refresh token when expired" but somehow the token will expire after an hour, should i do extra work to refresh the access token ?
can be related to https://github.com/googleapis/google-api-php-client/issues/1075 ? the access token cached by the google api package
in any google drive package, you have to refresh the token after more than 60min long time script, maybe you can make a pull request to fix that
any updates on this?
@foremtehan did you found any solution?
Thanks!
@marcoocram here is the solution https://github.com/masbug/flysystem-google-drive-ext/issues/33
Mmm is another repo and not released yet...
@marcoocram another repo but with the same config, just use dev branch
composer require masbug/flysystem-google-drive-ext:"1.x@dev"
maybe the source is the solution....
related: https://github.com/googleapis/google-api-php-client/pull/2134
@marcoocram that would be better since this package has not been supported since 29 Jul 2020
googleapis/google-api-php-client#2134 @marcoocram another solution?
Use my solution wrapping the code...
It was cache issue for me.