EmailMagicLinks

interface EmailMagicLinks

Provides all possible ways to call EmailMagicLinks endpoints

Types

Link copied to clipboard
data class Parameters(val email: String, val loginMagicLinkUrl: String? = null, val signupMagicLinkUrl: String? = null, val loginExpirationMinutes: UInt? = null, val signupExpirationMinutes: UInt? = null, val loginTemplateId: String? = null, val signupTemplateId: String? = null) : Parcelable

Data class used for wrapping parameters used with MagicLinks.EmailMagicLinks.loginOrCreate

Functions

Link copied to clipboard
abstract fun loginOrCreate(parameters: MagicLinks.EmailMagicLinks.Parameters, callback: (BaseResponse) -> Unit)

Send either a login or signup magic link to the user based on if the email is associated with a user already. A new or pending user will receive a signup magic link. An active user will receive a login magic link.

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

Send a magic link to an existing Stytch user using their email address. If you'd like to create a user and send them a magic link by email with one request, use loginOrCreate