authenticate: fix user-info call for AWS cognito (#792)

This commit is contained in:
Caleb Doxsey 2020-05-27 15:37:42 -06:00 committed by GitHub
parent b16bc5e090
commit 988477c90d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 140 additions and 1 deletions

View file

@ -125,7 +125,7 @@ func (p *Provider) Authenticate(ctx context.Context, code string, v interface{})
//
// https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
func (p *Provider) updateUserInfo(ctx context.Context, t *oauth2.Token, v interface{}) error {
userInfo, err := p.Provider.UserInfo(ctx, oauth2.StaticTokenSource(t))
userInfo, err := getUserInfo(ctx, p.Provider, oauth2.StaticTokenSource(t))
if err != nil {
return fmt.Errorf("identity/oidc: user info endpoint: %w", err)
}