This is for the Google Api PHP Client Library

If I have an access token but don't have a code, could I still authenticate a user?

Using the PHP library I'm able to authenticate with the code or with an id token but I'm just wondering if it's possible to do it with just the access token

thanks

有帮助吗?

解决方案 2

I ended up finding what I needed in their documentation here and here, and through an example they linked to from the latter documentation link

The example seemed to be using a previous version of the Google PHP Api Library but I was able to make some minor tweaks and get it to work.

其他提示

If you already have a valid access token, you don't need anything else, but in order to get the access token you'll need the authentication code (if that's the code you're talking about).

Access tokens expire, though, so depending on your application you'll have to persist the token info which allows you to refresh the token.

Take a look at the OAuth 2.0 documentation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top