Skip to content

[Bug]: Connectors not working on username login #3287

@JoshTheHero

Description

@JoshTheHero

What happened?

After upgrading from 1.57 to 1.60, it was discovered that logging in with a username via a Connector will not work. That same Connector with the same exact response will work if the user logs in via email instead of username on the FusionAuth page. The first debug log will find the matching user and indicate FusionAuth is attempting to sync response from the Connector to the User. But the subsequent error log will say it cannot find the user. Recording of me reproducing the issue below.

https://www.loom.com/share/282b579e4c6d467eb4d3c62835ca78cd

Here are the Event Logs from the issue with the user info redacted

Generic Connector Debug Log for [local node test ] with Id [7bc8cde5-23ab-4570-8306-9c14d272f078].

12/23/2025 09:03:53 PM Z Attempting authentication request to application with Id [19938d65-4e22-4a5c-852c-19b7ac1b8d4c] from IP address [192.168.117.1] for [jstroud] against the URL [http://connector-api:3000/].
12/23/2025 09:03:53 PM Z Endpoint returned status code [200].
12/23/2025 09:03:53 PM Z Connector User:
[REDACTED]
12/23/2025 09:03:53 PM Z User with Id [448f62f8-4a16-4312-a7cd-a143cc064260] already exists in tenant [8f045e76-2d28-4aab-81bd-c11a31c2bbb5]. Synchronize the user.
12/23/2025 09:03:53 PM Z Failed to synchronize the user. See error event log.

Failed to synchronize the user.
Exception encountered.

java.lang.Exception : Message: The user identity was not found after synchronization.

java.lang.Exception: The user identity was not found after synchronization.
	at io.fusionauth.api.service.connector.BaseExternalConnector.synchronizeExternalUser(BaseExternalConnector.java:226)
	at io.fusionauth.api.service.connector.GenericConnector$$EnhancerByGuice$$102d4a82.GUICE$TRAMPOLINE(<generated>)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)
	at io.fusionauth.api.domain.guice.mybatis.FusionAuthTransactionalMethodInterceptor.invoke(FusionAuthTransactionalMethodInterceptor.java:118)
	at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
	at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
	at io.fusionauth.api.service.connector.GenericConnector$$EnhancerByGuice$$102d4a82.synchronizeExternalUser(<generated>)
	at io.fusionauth.api.service.authentication.DefaultAuthenticationService.authenticateUser(DefaultAuthenticationService.java:778)
	at io.fusionauth.api.service.authentication.DefaultAuthenticationService.authenticate(DefaultAuthenticationService.java:279)
	at io.fusionauth.app.action.api.LoginAction.lambda$post$1(LoginAction.java:151)
	at io.fusionauth.app.action.api.BaseLoginAction.callLogin(BaseLoginAction.java:186)
	at io.fusionauth.app.action.api.LoginAction.post(LoginAction.java:151)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.primeframework.mvc.util.ReflectionUtils.invoke(ReflectionUtils.java:443)
	at org.primeframework.mvc.action.DefaultActionInvocationWorkflow.execute(DefaultActionInvocationWorkflow.java:77)
	at org.primeframework.mvc.action.DefaultActionInvocationWorkflow.perform(DefaultActionInvocationWorkflow.java:60)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.message.DefaultMessageWorkflow.perform(DefaultMessageWorkflow.java:50)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.validation.DefaultValidationWorkflow.perform(DefaultValidationWorkflow.java:45)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.security.DefaultSecurityWorkflow.perform(DefaultSecurityWorkflow.java:79)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.parameter.DefaultPostParameterWorkflow.perform(DefaultPostParameterWorkflow.java:49)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.content.DefaultContentWorkflow.perform(DefaultContentWorkflow.java:74)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.parameter.DefaultParameterWorkflow.perform(DefaultParameterWorkflow.java:58)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.parameter.DefaultURIParameterWorkflow.perform(DefaultURIParameterWorkflow.java:92)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.scope.DefaultScopeRetrievalWorkflow.perform(DefaultScopeRetrievalWorkflow.java:50)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.action.DefaultActionMappingWorkflow.perform(DefaultActionMappingWorkflow.java:130)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.security.DefaultSavedRequestWorkflow.perform(DefaultSavedRequestWorkflow.java:65)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.cors.CORSRequestWorkflow.perform(CORSRequestWorkflow.java:68)
	at org.primeframework.mvc.workflow.SubWorkflowChain.continueWorkflow(SubWorkflowChain.java:50)
	at org.primeframework.mvc.workflow.DefaultMVCWorkflow.perform(DefaultMVCWorkflow.java:109)
	at org.primeframework.mvc.PrimeMVCRequestHandler.handle(PrimeMVCRequestHandler.java:76)
	at io.fusionauth.http.server.internal.HTTPWorker.run(HTTPWorker.java:183)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)

Version

1.61.1

Affects Versions

Anything past 1.60

Alternatives / Workarounds

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions