nao-pon/flysystem-google-drive

Invalid Credentials (refresh token not working)

foremtehan opened this issue · 11 comments

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 googleapis/google-api-php-client#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!

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: googleapis/google-api-php-client#2134

@marcoocram that would be better since this package has not been supported since 29 Jul 2020

Use my solution wrapping the code...

It was cache issue for me.