matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

Implement registering with an email support #1298

Open kegsay opened 4 years ago

kegsay commented 4 years ago

Spec: https://matrix.org/docs/spec/client_server/r0.6.1#email-based-identity-homeserver Sytests:

    × Can register using an email address
rohitgeddam commented 4 years ago

I want to work on it!

kegsay commented 4 years ago

Great, thanks! Check out #dendrite-dev:matrix.org if you want some help :)

PiotrKozimor commented 3 years ago

The Derived struct was about to be deleted - #889, #1230. There is Registration field in it which contains allowable authentication flows. To my understanding it is not used yet. How do we want to populate it?

PiotrKozimor commented 3 years ago

I want to take another approach on it: dendrite will send confirmation email on it's own. This would also enable another requests to be handled internally:

It would also enable logging with email as long as ID servers would no longer be used.

Regarding configuration - I want to pass allowed flows and parameters explicitly in it, e.g.:

client_api:
  registration:
    flows:
      - stages:
        - m.login.recaptcha
        - m.login.email.identity
    parameters: 
      m.login.recaptcha:
        public_key: foobar

It would be validated on dendrite startup and any error would be reported as fatal. If SMTP configuration will be passed to dendrite, user could pass m.login.email.identity stage to flow.

Any thoughts on this?

PiotrKozimor commented 3 years ago

@kegsay the first part - extension of UserAPI - is implemented here: https://github.com/matrix-org/dendrite/pull/1970