Supabase.GoTrue.Schemas.VerifyOTP behaviour (supabase_gotrue v0.3.10)

This schema is used to validate and parse the parameters for verifying an OTP.

Fields

Mobile OTP

  • phone - The user's phone number.
  • token - The OTP token.
  • type - The type of OTP.
  • options - The options for the OTP.
    • redirect_to - The redirect URL.
    • captcha_token - The captcha token.

Email OTP

  • email - The user's email.
  • token - The OTP token.
  • type - The type of OTP.
  • options - The options for the OTP.
    • redirect_to - The redirect URL.
    • captcha_token - The captcha token.

Token Hash

  • token_hash - The token hash.
  • type - The type of OTP.
  • options - The options for the OTP.
    • redirect_to - The redirect URL.
    • captcha_token - The captcha token.

Summary

Types

@opaque changeset()
@type email() :: %{
  email: String.t(),
  token: String.t(),
  type: String.t(),
  options: options()
}
@type mobile() :: %{
  phone: String.t(),
  token: String.t(),
  type: String.t(),
  options: options()
}
@type options() :: %{redirect_to: String.t(), captcha_token: String.t()}
@type t() :: mobile() | email() | token_hash()
Link to this type

token_hash()

@type token_hash() :: %{token_hash: String.t(), type: String.t(), options: options()}

Callbacks

Link to this callback

changeset(t, map)

(optional)
@callback changeset(t(), map()) :: changeset()
Link to this callback

parse(map)

(optional)
@callback parse(map()) :: {:ok, t()} | {:error, changeset()}

Functions

Link to this function

to_request(params)