Supabase.GoTrue.Schemas.VerifyOTP (supabase_gotrue v0.4.1)

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

email()

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

mobile()

@type mobile() :: %{
  phone: String.t(),
  token: String.t(),
  type: String.t(),
  options: options()
}

options()

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

t()

@type t() :: mobile() | email() | token_hash()

token_hash()

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

Functions

parse(attrs)

to_request(params)