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
The server's .well-known/openid-configuration reports a UserInfo endpoint which is used in the UserInfo method. If the OIDC provider does not report an endpoint, UserInfo reports an error. But there is no way programmatically check beforehand and no way to check the error message other than string matching:
ui, err = provider.UserInfo(ctx, source)
if !strings.Contains(err.Error(), "user info endpoint is not supported") {
// handle it
}
It would be nice if it were possible to avoid string matching on the error. Perhaps either something to pass to errors.Is or a mechanism for inspecting the contents of the .well-known/openid-configuration that the oauth2 package fetched?
The text was updated successfully, but these errors were encountered:
The server's
.well-known/openid-configuration
reports a UserInfo endpoint which is used in theUserInfo
method. If the OIDC provider does not report an endpoint, UserInfo reports an error. But there is no way programmatically check beforehand and no way to check the error message other than string matching:It would be nice if it were possible to avoid string matching on the error. Perhaps either something to pass to
errors.Is
or a mechanism for inspecting the contents of the.well-known/openid-configuration
that the oauth2 package fetched?The text was updated successfully, but these errors were encountered: