Registration Wizard
Set of methods to be able to create an account on a homeserver.
Common scenario to register an account successfully:
Call getRegistrationFlow to check that you application supports all the mandatory registration stages
Call createAccount to start the account creation
Fulfill all mandatory stages using the methods performReCaptchadummy, etc.
More documentation can be found in the file https://github.com/element-hq/element-android/blob/main/docs/signup.md and https://matrix.org/docs/spec/client_server/latest#account-registration-and-management
Functions
Perform the "m.login.terms" stage.
Perform the "m.login.email.identity" or "m.login.msisdn" stage.
Useful to poll the homeserver when waiting for the email to be validated by the user. Once the email is validated, this method will return successfully.
This is the first method to call in order to create an account and start the registration process.
Perform the "m.login.dummy" stage.
Returns the current ThreePid, waiting for validation. The SDK will store it in database, so it can be restored even if the app has been killed during the registration
Call this method to get the possible registration flow of the current homeserver. It can be useful to ensure that your application implementation supports all the stages required to create an account. If it is not the case, you will have to use the web fallback to let the user create an account with your application. See org.matrix.android.sdk.api.auth.AuthenticationService.getFallbackUrl
Send the code received by SMS to validate a msisdn. If the code is correct, the registration request will be executed to validate the msisdn.
Return true when login and password have been sent with success to the homeserver, i.e. createAccount has been called successfully.
Perform the "m.login.recaptcha" stage.
Can be call to check is the desired userName is available for registration on the current homeserver. It may also fails if the desired userName is not correctly formatted or does not follow any restriction on the homeserver. Ex: userName with only digits may be rejected.
Perform custom registration stage by sending a custom JsonDict. Current registration "session" param will be included into authParams by default. The authParams should contain at least one entry "type" with a String value.
Ask the homeserver to send again the current threePid (email or msisdn).