google / php-photoslibrary

PHP client library for the Google Photos Library API
http://developers.google.com/photos
Apache License 2.0
90 stars 32 forks source link

Fix bug: Samples is saving access token, not refresh token #14

Open danny-wu opened 5 years ago

danny-wu commented 5 years ago

There is a bug in the sample code that results in the access token being saved as the refresh token, instead of the refresh token being saved.

See the PR for a fix.

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

danny-wu commented 5 years ago

I signed it!

googlebot commented 5 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

danny-wu commented 5 years ago

@jfschmakeit Not sure if you're the maintainer, if so this PR is for you.

Took me hours and hours to debug why I was getting the "token expired" error after 1 hour, turns out the sample code has a bug in it. Shows you how hard OAuth is, lol.

shorts7wound commented 3 years ago

OAuth

how did you fix it ?