Skip to content

Commit

Permalink
[CLI-3333] Make email address for SSO case insensitive (#2965)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmalikconfluent authored Dec 5, 2024
1 parent 7465d37 commit 0fbe3a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/auth/auth_token_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package auth
import (
"context"
"fmt"
"strings"
"time"

"github.com/pkg/browser"
Expand Down Expand Up @@ -230,7 +231,7 @@ func (a *AuthTokenHandlerImpl) checkSSOEmailMatchesLogin(client *ccloudv1.Client
if err != nil {
return err
}
if getMeReply.GetUser().GetEmail() != loginEmail {
if strings.EqualFold(getMeReply.GetUser().GetEmail(), loginEmail) {
return errors.NewErrorWithSuggestions(
fmt.Sprintf("expected SSO credentials for %s but got credentials for %s", loginEmail, getMeReply.GetUser().GetEmail()),
"Please re-login and use the same email at the prompt and in the SSO portal.",
Expand Down

0 comments on commit 0fbe3a0

Please sign in to comment.