Module Os_handlersSource

include module type of struct include Os.Handlers end
Sourceval connect_handler : unit -> ((string * string) * bool) -> unit Lwt.t

connect_handler () ((login, password), keepMeLoggedIn) connects the user with login and password and keeps the user logged in between different session if keepMeLoggedIn is set to true.

Sourceval disconnect_handler : ?main_page:bool -> unit -> unit -> unit Lwt.t

disconnect_handler ?main_page () () disconnects the current user.

Sourceval sign_up_handler : unit -> string -> unit Lwt.t

sign_up_handler () email signes up an user with email email.

Sourceval add_email_handler : unit -> string -> unit Lwt.t

add_email_handler () email adds a new e-mail address for the current user and sends an activation link. Eliom reference User.user_already_exists is set to true if the e-mail address already exists in database.

Exception raised when something went wrong with an action link key. The action link key is given as parameter as a type Types.actionlinkkey_info.

Sourceexception Account_already_activated_unconnected of Os.Types.Action_link_key.info

Exception raised when an account has been already activated and no user is connected.

Sourceexception Invalid_action_key of Os.Types.Action_link_key.info

Exception raised when the key is oudated.

Sourceexception No_such_resource

Exception raised when the requested resource is not available.

action_link_handler userid_o activation_key () is the handler for activation keys.

Depending on the error, No_such_resource, Custom_action_link, Invalid_action_key or Account_already_activated_unconnected can be raised.

Sourceval confirm_code_signup_handler : unit -> (string * (string * (string * string))) -> unit Lwt.t

confirm_code_signup_handler () (first_name, (last_name, (pass, number))) sends a verification code to number, displays a popup for confirming the code, and creates the account if all goes well.

Sourceval confirm_code_extra_handler : unit -> string -> unit Lwt.t

confirm_code_extra_handler () number is like confirm_code_signup_handler but for adding an additional number to the account. The new phone is added to the account.

Sourceval confirm_code_recovery_handler : unit -> string -> unit Lwt.t

confirm_code_recovery_handler () number is like confirm_code_signup_handler but for recovering a lost password. The user is redirected to the settings page for setting a new password.

Sourceval set_password_rpc : (string * string) -> unit Lwt.t

set_password_rpc (password, confirmation_password) is a RPC to set_password.

Sourceval restart : ?url:string -> unit -> unit

restart ?url () restarts the client and redirects to the url url.