View Source WorkOS.Passwordless (WorkOS SDK for Elixir v1.1.0)

Manage Magic Link API in WorkOS.

@see https://workos.com/docs/reference/magic-link

Summary

Functions

Creates a Passwordless Session for a Magic Link Connection

Emails a user the Magic Link confirmation URL, given a Passwordless session ID.

Functions

Link to this function

create_session(client \\ WorkOS.client(), opts)

View Source

Creates a Passwordless Session for a Magic Link Connection

Parameter options:

  • :type - The type of Passwordless Session to create. Currently, the only supported value is MagicLink. (required)
  • :email - The email of the user to authenticate. (required)
  • :redirect_uri - Optional parameter that a developer can choose to include in their authorization URL.
  • :expires_in - The number of seconds the Passwordless Session should live before expiring.
  • :state - Optional parameter that a developer can choose to include in their authorization URL.
Link to this function

send_session(client \\ WorkOS.client(), session_id)

View Source
@spec send_session(WorkOS.Client.t(), String.t()) ::
  WorkOS.Client.response(WorkOS.Passwordless.Session.Send)

Emails a user the Magic Link confirmation URL, given a Passwordless session ID.