package sihl-contract

  1. Overview
  2. Docs

Source file password_reset.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
open Sihl_type

module type Sig = sig
  include Sihl_core.Container.Service.Sig

  (** Create and store a reset token.

      Returns [None] if there is no user with [email]. The reset token can be used with
      [reset_password] to set the password without knowing the old password. *)
  val create_reset_token : email:string -> Token.t option Lwt.t

  (** Set the password of a user associated with the reset [token]. *)
  val reset_password
    :  token:string
    -> password:string
    -> password_confirmation:string
    -> (unit, string) Result.t Lwt.t

  val register : unit -> Sihl_core.Container.Service.t
end
OCaml

Innovation. Community. Security.