From 87b7c7270d739e999867518793492b636e3b198c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Tue, 10 Jan 2023 14:45:15 +0200 Subject: [PATCH] Convert username to lowercase --- .drone.yml | 2 ++ connector/github/github.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..e7b5dfa9 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,2 @@ +kind: template +load: docker.yaml diff --git a/connector/github/github.go b/connector/github/github.go index ef8d418f..ec0615f9 100644 --- a/connector/github/github.go +++ b/connector/github/github.go @@ -270,7 +270,7 @@ func (c *githubConnector) HandleCallback(s connector.Scopes, r *http.Request) (i identity = connector.Identity{ UserID: strconv.Itoa(user.ID), Username: username, - PreferredUsername: user.Login, + PreferredUsername: strings.ToLower(user.Login), Email: user.Email, EmailVerified: true, }