From c03d527d2511a9dd22451520d3bd44e53af398d7 Mon Sep 17 00:00:00 2001 From: Will Weber Date: Sun, 1 Jul 2018 08:56:16 -0400 Subject: [PATCH] pkg/social/github: Allow changing of userinfo data (#12471) Experienced a problem where a user whose email changed was no longer able to login. By using the ID as a primary identifier, we can avoid conflicts of this variety within the github OAuth provider. --- pkg/social/github_oauth.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/social/github_oauth.go b/pkg/social/github_oauth.go index 815c684cf03..b07f112b8d3 100644 --- a/pkg/social/github_oauth.go +++ b/pkg/social/github_oauth.go @@ -213,6 +213,7 @@ func (s *SocialGithub) UserInfo(client *http.Client, token *oauth2.Token) (*Basi userInfo := &BasicUserInfo{ Name: data.Login, Login: data.Login, + Id: fmt.Sprintf("%d", data.Id), Email: data.Email, }