bitly / oauth2_proxy

A reverse proxy that provides authentication with Google, Github or other provider
MIT License
5.1k stars 1.21k forks source link

oidc provider should read email from userInfo #615

Open Kaszaq opened 6 years ago

Kaszaq commented 6 years ago

Hello,

The oidc specifications says that when authorization code is used and access token is returned email is returned from UserInfo endpoint and id_token has email when no access token was issued.

The Claims requested by the profile, email, address, and phone scope values are returned from the UserInfo Endpoint, as described in Section 5.3.2, when a response_type value is used that results in an Access Token being issued. However, when no Access Token is issued (which is the case for the response_type value id_token), the resulting Claims are returned in the ID Token.

Can you please extend oidc provider implementation to use userinfo endpoint?