Login Using Already Existing Matrix Account

· 119 words · 1 minute read

I have a deep interest in both matrix and different authentication schemes. When I saw the HN discussion about “Sign in with Matrix”, I thought I could probably come up with something better.

Someone else had basically the same idea, to authenticate based on matrix account instead of email address:

  1. Ask for matrix account (instead of email address)
  2. Send code to given mxid
  3. Let authentication proceed if user gives the code you sent

Login with Matrix didn’t have source code available so I wrote matrix-login and published source code on GitLab.

Both are much safer than giving someone else your full mxid and password and hoping that they don’t abuse or leak that information, like Sign in with Matrix.