I think this might be a bug.
I made a web service for a Connector that returned:
return response.status(200).json({
user: {
'id': '647978c5-01a0-49b8-8f4f-daab25e7ce63',
'password': 'password',
'active': true
}
});
FusionAuth System Event Log said I hadn't given it a unique id, which is not true:
Generic Connector Debug Log for [Test] with Id [b9a215ed-3078-4339-9638-62416fd20837].
3/20/2024 01:58:58 PM Z Attempting authentication request to application with Id [e9fdb985-9173-4e01-9d73-ac2d60d1dc8e] from IP address [172.27.0.1] for [myemailaddress+frontegguserc@simplelogin.com] against the URL [http://host.docker.internal:6252].
3/20/2024 01:59:00 PM Z Endpoint returned status code [200].
3/20/2024 01:59:00 PM Z Connector User:
{
"active" : true,
"connectorId" : "e3306678-a53a-4964-9040-1c96f36dda72",
"data" : {
"hi" : "hi!"
},
"id" : "647978c5-01a0-49b8-8f4f-daab25e7ce63",
"memberships" : [ ],
"passwordChangeRequired" : false,
"preferredLanguages" : [ ],
"registrations" : [ ],
"twoFactor" : {
"methods" : [ ],
"recoveryCodes" : [ ]
},
"usernameStatus" : "ACTIVE",
"verified" : false
}
3/20/2024 01:59:00 PM Z
. WARNING DISCARDING USER Connector because it was missing a unique id in the [user.id] or enough information to store in FusionAuth (i.e. an email or username).
If I changed my service to instead return the below, the Connector works and logs me in.
return response.status(200).json({
user: {
'id': '647978c5-01a0-49b8-8f4f-daab25e7ce63',
'password': 'password',
'active': true,
'email': email,
'username': email
}
});
Either a Connector should work with only a UUID, or the code and docs should change to say it requires email and username too.