Skip to content

Commit 39e32cd

Browse files
authored
Fix username (#37)
Signed-off-by: Jan Steffen <[email protected]>
1 parent c66b1d8 commit 39e32cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/gateway/usecases/get_auth_token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (s *getAuthTokenUsecase) Run(ctx context.Context) error {
9090
return err
9191
}
9292

93-
username := strings.ToLower(user.Name)
93+
username := strings.ToLower(strings.Split(user.GetEmail(), "@")[0])
9494
if s.request.GetRole() != string(k8s.DefaultRole) {
9595
username = fmt.Sprintf("%s-%s", username, s.request.GetRole())
9696
}

0 commit comments

Comments
 (0)