diff --git a/pkg/apigateway/handler/idp.go b/pkg/apigateway/handler/idp.go index a304120fe3..af773abe27 100644 --- a/pkg/apigateway/handler/idp.go +++ b/pkg/apigateway/handler/idp.go @@ -116,7 +116,7 @@ func (h *AuthHandlers) getIdpSsoRedirectUri(ctx context.Context, w http.Response } func findExtUserId(input string) string { - pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFoundError`) + pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFound`) matches := pattern.FindAllStringSubmatch(input, -1) log.Debugf("%#v", matches) if len(matches) > 0 && len(matches[0]) > 1 { diff --git a/pkg/apigateway/handler/idp_test.go b/pkg/apigateway/handler/idp_test.go index c33cf9bc6c..d37398533c 100644 --- a/pkg/apigateway/handler/idp_test.go +++ b/pkg/apigateway/handler/idp_test.go @@ -22,7 +22,7 @@ func TestFindExtUserId(t *testing.T) { want string }{ { - in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFoundError", + in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFound", want: "qiujian", }, }