문제

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