matrix-nio icon indicating copy to clipboard operation
matrix-nio copied to clipboard

Mozilla.org SSO Login?

Open Milkdrop opened this issue 5 years ago • 4 comments

Do you support logging in through SSO (which is the only method of logging into mozilla's Matrix homeserver)?

Milkdrop avatar Jul 23 '20 17:07 Milkdrop

Yes, at least one client based on nio implements SSO support and as far as I know some people use it on the Mozilla server.

poljar avatar Jul 23 '20 17:07 poljar

@poljar are you able to provide any example for SAML2? I am seeking it for a long time and I'm unable to find. As far as I can understand I should use login_raw from nio - but how to fill the auth_dict for SAML2 is a big question. My server operator gives SAML2 as the only possible kind of authorisation.

ser avatar Mar 28 '22 01:03 ser

I've succeeded after a lot of reading and trying. The exact code has been lost but the procedure for mozilla.org is:

  1. open https://mozilla.modular.im/_matrix/static/client/login/ and login in your browser (or if you have an HTTP server to receive code: https://mozilla.modular.im/_matrix/client/r0/login/sso/redirect?redirectUrl=YOUR_URL).
  2. copy the loginToken parameter in the final URL after login.
  3. Use {"type": "m.login.token", "token": "<loginToken>"} as your auth_dict.

lilydjwg avatar Mar 28 '22 02:03 lilydjwg

I need to do it programmatically == no browser or human assisting.

ser avatar Mar 28 '22 03:03 ser