Skip to content

How to verifyIdToken with credential return from google #2391

@dieptang

Description

@dieptang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions