I'm developing a chat application similar to Telegram using Matrix.io as the underlying framework. However, I need assistance in customizing the registration and login process to align with Telegram's functionality, particularly with regards to usernames, phone-based registration, and optional password for second-step verification.
Here are the specific requirements I'm looking to implement:
Registration Process:
Allow users to register using their phone number (3pid MSISDN) as the primary identifier.
Provide the flexibility for users to choose whether or not to set a username during registration, similar to Telegram.
Allow users to skip setting a username if they prefer.
Login Process:
Implement phone verification as the primary login method, without requiring a password, similar to Telegram.
Consider the phone number as the primary login identifier.
Optional Password for Second-step Verification:
Give users the option to set a password as a second-step verification, similar to Telegram.
If a user sets a password during registration, it should be required for subsequent logins.
If a user chooses not to set a password, they can continue to log in solely with phone verification.
Additional User Information:
During registration, capture and store additional user information, such as gender.
Allow users to modify this information later through their profile.
I would greatly appreciate guidance on customizing the Matrix.io framework to achieve these requirements. Specifically, I'm seeking insights on how to implement the optional password for second-step verification and ensuring a smooth integration with the phone-based registration and login processes.
So far, I have researched the Matrix.io documentation to understand the default registration and login process. I have also explored Sydent for 3pid phone identification server. But am not really sure how to satisfy those requirements