ma1uta / ma1sd

Federated Matrix Identity Server (formerly fork of kamax/mxisd)
GNU Affero General Public License v3.0
167 stars 55 forks source link

REST auth using m.id.thirdparty (email) + password #101

Open fmcd opened 2 years ago

fmcd commented 2 years ago

Hi, I wish to authenticate with an external system via the REST identity store backend, but the external system uses email address + password for its users (no username as such).

I have a synapse REST password provider that implements the check_3pid_auth function, so when I login at the element client using email and password on the client, the following request is sent to ma1sd

{"identifier:
{"address":"someemail@yahoo.com",
"medium":"email",
"type":"m.id.thirdparty"},
"initial_device_display_name":"element.testserver.com (Firefox, Linux)",
"password":"234234",
"type":"m.login.password"}

However, this is not accepted by the rc/main/java/io/kamax/mxisd/http/undertow/handler/auth/RestAuthHandler.java, and yields the response Error M_JSON_MISSING_KEYS: Missing id or password keys

Is there some other way I should be doing this? My goal is to allow login using email+password and the automatic registration on synapse with a hashed/generated user id, if the user does not exist.