You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that apple and paypal have similar issues with using string values as well. This is nonconformant to the OpenID spec, but it's annoying enough to want work around.
How to Reproduce
Steps to reproduce the behavior:
Deploy AuthService using Cognito as the OIDC IdP.
Start the auth code sign in.
Sign in to Cognito.
Return to AuthService authorization callback, which will error while retrieving you user info.
Expected behavior
Sign in should work and retrieve your email.
Config Files
All defaults except for the mandatory OAuth client id etc.
Logs
level=error msg="Not able to fetch userinfo: oidc: failed to decode userinfo: json: cannot unmarshal string into Go struct field UserInfo.email_verified of type bool"
@Deadleg thanks for reporting this!
It's very interesting to see that AWS, Paypal and Apple have bugs in their OIDC implementation.
I would like to ask:
Do you know if there is any issue in an AWS repo tracking this bug?
Do you have any information about how other OIDC clients in the wild handle this special case? This is essentially going off-spec.
Extend the GetUserInfo() function of the oidc.go to handle both
booleans and string values for the email_verified field of the
UserInfo struct. The OIDC spec defined that this field MUST have
boolean value, however some external Identity Providers deviate
from this spec and use string values for this field. AuthService
will now cover both types (e.g., true, "true"...).
GitHub-PR: #82Closes#63
Signed-off-by: Athanasios Markou <athamark@arrikto.com>
Reviewed-by: Ioannis Bouloumpasis <buluba@arrikto.com>
Is this a bug report or feature request?
Describe the bug
When using AWS Cognito the email_verified field is a string
"true"
instead of a boolean, causing an unmarshal error inoidc-authservice/oidc.go
Line 81 in 6f251f1
It appears that apple and paypal have similar issues with using string values as well. This is nonconformant to the OpenID spec, but it's annoying enough to want work around.
How to Reproduce
Steps to reproduce the behavior:
Expected behavior
Sign in should work and retrieve your email.
Config Files
All defaults except for the mandatory OAuth client id etc.
Logs
Environment:
fef11c3
Additional context
This patch fixes the issue:
The text was updated successfully, but these errors were encountered: