EmailOTP

interface EmailOTP

Provides all possible ways to call Email OTP endpoints

Types

Link copied to clipboard
data class Parameters(    val email: String,     val expirationMinutes: UInt = DEFAULT_OTP_EXPIRATION_TIME_MINUTES,     val loginTemplateId: String? = null,     val signupTemplateId: String? = null)

Functions

Link copied to clipboard
abstract suspend fun loginOrCreate(parameters: OTP.EmailOTP.Parameters): LoginOrCreateOTPResponse
abstract fun loginOrCreate(parameters: OTP.EmailOTP.Parameters, callback: (LoginOrCreateOTPResponse) -> Unit)

Wraps Stytch’s Email OTP login_or_create endpoint. Requests an Email OTP for a user to log in or create an account depending on the presence and/or status current account.

Link copied to clipboard
abstract suspend fun send(parameters: OTP.EmailOTP.Parameters): BaseResponse
abstract fun send(parameters: OTP.EmailOTP.Parameters, callback: (BaseResponse) -> Unit)

Wraps Stytch’s Email OTP send endpoint. Requests an Email OTP for a user to authenticate.