capabilities.work

Magic Link Login or Create

A 3-step recipe with Stytch. We can help you get access.

Recipe · 3 steps

Magic Link Login or Create

with Stytch · Identity & Access Management

Email a login-or-create magic link, authenticate the token, and verify the session.

  1. Send an email magic link that logs in an existing user or creates a new one, returning whether the user was newly created.
  2. Authenticate the magic link token captured from the clicked link to mint a session for the user.
  3. Read the active sessions for the authenticated user to confirm the session is live.
What you'll need to have ready
  • email: The email address to send the login-or-create magic link to.
  • login_magic_link_url: The URL the user is redirected to after clicking a login magic link.
  • signup_magic_link_url: The URL the user is redirected to after clicking a signup magic link.
  • token: The magic link token extracted from the URL the user clicked.
  • session_duration_minutes: Optional session lifetime in minutes for the authenticated session.
For your developer

Arazzo workflow stytch:magic-link-login-or-create, 3 operations: api_magic_v1_magic_links_email_LoginOrCreate → api_magic_v1_Authenticate → api_session_v1_Get. Specs on APIs.io.