Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Os_connect_phone

module Os_connect_phone : sig..end

type sms_error_core = [ `Invalid_number | `Limit | `Send | `Unknown ]

To be used for signalling errors with SMS transmission

type sms_error = [ `Invalid_number | `Limit | `Ownership | `Send | `Unknown ]
val request_code : string -> (unit, sms_error) Stdlib.result Lwt.t

Send a validation code for a new e-mail address (corresponds to confirm_code_signup and confirm_code_extra).

val request_recovery_code : string -> (unit, sms_error) Stdlib.result Lwt.t

Send a validation code for recovering an existing address.

val confirm_code_extra : string -> bool Lwt.t

Confirm validation code and add extra phone to account of the currently connected user

val confirm_code_signup : 
  first_name:string ->
  last_name:string ->
  code:string -> password:string -> unit -> bool Lwt.t

Confirm validation code and complete sign-up with the phone number.

val confirm_code_recovery : string -> bool Lwt.t

Confirm validation code and recover account. We redirect to the settings page for setting a new password.

val connect : 
  keepmeloggedin:bool ->
  password:string ->
  string ->
  [ `Login_ok | `No_such_user | `Password_not_set | `Wrong_password ]
  Lwt.t