Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google OIDC provider: can't verify JWT signature #35

Open
bpteague opened this issue May 26, 2015 · 5 comments
Open

Google OIDC provider: can't verify JWT signature #35

bpteague opened this issue May 26, 2015 · 5 comments

Comments

@bpteague
Copy link

I'm having trouble using Google as an OpenID Connect provider. I've been debugging with client_example.php and poking around with Firebug, and it looks like things are getting hung up verifying the JWT signature: the exception I get is "Unable to verify signature."

Things I've checked:

FWIW, I'm using PHP 5.5.9 (Ubuntu Trusty up-to-date) with phpseclib 0.3.5. The bug persists with phpseclib 3.10 (the current version.)

I'm working on the "master" branch; branch jumbojett-patch-1 has bug in get_key_for_alg which always returns the first key in $keys.

Any clues?

@piersharding
Copy link

Hi -
are you using something like ? :

$oidc = new OpenIDConnectClient('https://accounts.google.com',
$pluginconfig->clientid,
$pluginconfig->secret);
$oidc->addScope(array("openid", "email", "profile"));
$oidc->authenticate();

Cheers ,
Piers Harding

@bpteague
Copy link
Author

Yes, that's exactly the configuration I'm using. Everything works until the call to $rsa->verify(); and if I ignore the return value, everything works fine.

@cicalese
Copy link
Collaborator

I believe that I'm intermittently having the same issue, which I discussed at #28.

@bpteague
Copy link
Author

I agree that it may be the same issue (though I've never seen the authentication go through.) I have the same problem with the MIT OIDC provider, which uses MITREid Connect: https://github.com/mitreid-connect/

@rasodu
Copy link
Collaborator

rasodu commented Jun 3, 2017

@bpteague Is this related to #83? If it is, then you can close the issue and join the discussion there. @screambeard has some suggestions to fix the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants