Skip to content

Wrong issuer: accounts.google.com #523

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

Closed
cgawron opened this issue Feb 23, 2019 · 2 comments
Closed

Wrong issuer: accounts.google.com #523

cgawron opened this issue Feb 23, 2019 · 2 comments

Comments

@cgawron
Copy link

cgawron commented Feb 23, 2019

For Google, the issuer check fails in processIdTokken. The discovery document of google (https://accounts.google.com/.well-known/openid-configuration) states

"issuer": "https://accounts.google.com"

while the token contains

"iss": "accounts.google.com"

This might be a bug on Google's side (or maybe the spec is not clear whether the issuer refers only to the host part of the URL), but it would help if the library could cope with it.

BTW, I also tried specifying the issuer as accounts.google.comin the config, but then I can't even load the discovery document.

How are other user dealing with this issue?

@jeroenheijmans
Copy link
Collaborator

It seems that OAuth2 (RFC7519) allows a StringOrUri so with or without schema is both up to spec? However, OpenId (Connect Core 1.0) does say that:

[The Issuer Identifier obtained during discovery] MUST exactly match the value of the iss (issuer) Claim.

So Google is being a pain here, by providing different values during discovery and inside the token. It was noted in other projects too that this occurs, the conclusion there seems similar: a workaround is needed.

I saw you already created a PR for this, #524 (that was probably intending to reference this issue in the "fixes" message?), I'll comment there on the proposed solution.

Careful by the way that there may be more trouble ahead for you with Google's auth, I remember #364 that shows some issues with the origin of the iframe parent.

@jeroenheijmans
Copy link
Collaborator

I think as per this comment things got fixed in the latest version. Let us know if the issue persists and we could reopen this issue!

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

2 participants