Can't Validate Google Access Token (wrong number of segments)
问题 I have very simple code directly from Google's website $client = new Google_Client(['client_id' => $CLIENT_ID]); $payload = $client->verifyIdToken($id_token); if ($payload) { $userid = $payload['sub']; echo $userid; } else { // Invalid ID token echo "error"; } I get the following error(s): <b>Fatal error</b>: Uncaught exception 'UnexpectedValueException' with message 'Wrong number of segments' in /../vendor/firebase/php-jwt/src/JWT.php:79 Stack trace: #0 /../vendor/google/apiclient/src/Google