google-api-php-client
google-api-php-client copied to clipboard
How to verifyIdToken with credential return from google
Hello there,
I am using Google Gsi for Google login with the callback resonsding client_id, credential, select_by. I sent it to the PHP server and using JWT for decode it but not help.
This is the code: $decode = JWT::decode($credential, $key, array('HS256'));
which $key is getting from Google Console "Client Secret" when create the credentials right?
I also give it a try with $client->verifyIdToken($credential); but it;s also not works. The error always appear is "Wrong number of segments"
Please help me solve it.
For now I know the decode with JWT successfully. But I cannot verifyToken. Can anybody help ?