How can I decode a JWT generated by Google using Firebase JWT in PHP?
I am trying to decode a JWT from Google API in a PHP endpoint:
use \Firebase\JWT\JWT;
$decoded = JWT::decode($jwt, $secret, array('RS256'));
However, I get the error: "OpenSSL error: error:0909006C:PEM routines:get_name:no start line"
I can't get the jwt to be verified at jwt.io, either:


I am able to decode my own HS256 JWTs using this method without any problems.
composer require google/apiclient
use Google\AccessToken\Verify;
$verify = new Verify();
$payload = $verify->verifyIdToken($request->google_token);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With