From d70d33f1c3a84ad6a998e1f06ce0ef28a07c4e9b Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Thu, 14 Mar 2024 09:12:13 +0700 Subject: [PATCH] patch: fix azure-ad,github callback --- auth/azure-ad.go | 2 +- auth/github.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/azure-ad.go b/auth/azure-ad.go index f5bdf4c5b..f6f565fba 100644 --- a/auth/azure-ad.go +++ b/auth/azure-ad.go @@ -66,7 +66,7 @@ func handleAzureCallback(w http.ResponseWriter, r *http.Request) { return } } - user, err := logic.GetUser(content.Email) + user, err := logic.GetUser(content.UserPrincipalName) if err != nil { handleOauthUserNotFound(w) return diff --git a/auth/github.go b/auth/github.go index 37c66085a..4bcc6753c 100644 --- a/auth/github.go +++ b/auth/github.go @@ -66,7 +66,7 @@ func handleGithubCallback(w http.ResponseWriter, r *http.Request) { return } } - user, err := logic.GetUser(content.Email) + user, err := logic.GetUser(content.Login) if err != nil { handleOauthUserNotFound(w) return