Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Credentials (refresh token not working) #99

Open
foremtehan opened this issue Aug 7, 2021 · 11 comments
Open

Invalid Credentials (refresh token not working) #99

foremtehan opened this issue Aug 7, 2021 · 11 comments

Comments

@foremtehan
Copy link

foremtehan commented Aug 7, 2021

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 ?

@foremtehan foremtehan changed the title Invalid Credentials Invalid Credentials (access token expires after one hour) Aug 7, 2021
@foremtehan foremtehan changed the title Invalid Credentials (access token expires after one hour) Invalid Credentials (refresh token not working) Aug 7, 2021
@foremtehan
Copy link
Author

can be related to googleapis/google-api-php-client#1075 ? the access token cached by the google api package

@PaolaRuby
Copy link

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

@marcoocram
Copy link

any updates on this?

@foremtehan did you found any solution?

Thanks!

@PaolaRuby
Copy link

@marcoocram here is the solution masbug/flysystem-google-drive-ext#33

@marcoocram
Copy link

Mmm is another repo and not released yet...

@PaolaRuby
Copy link

@marcoocram another repo but with the same config,
just use dev branch

composer require masbug/flysystem-google-drive-ext:"1.x@dev"

@marcoocram
Copy link

maybe the source is the solution....

related: googleapis/google-api-php-client#2134

@PaolaRuby
Copy link

PaolaRuby commented Sep 30, 2021

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

@PaolaRuby
Copy link

googleapis/google-api-php-client#2134
@marcoocram another solution?

@marcoocram
Copy link

Use my solution wrapping the code...

@lovecoding-git
Copy link

It was cache issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants