Skip to main content

generateLink()

Generates links to be sent via email or other.

Parameters#

  • typerequiredsignup | magiclink | recovery | invite

    The link type ("signup" or "magiclink" or "recovery" or "invite").

  • emailrequiredstring

    The user's email.

  • optionsrequiredobject

    No description provided.

      Properties
    • dataoptionalobject

      No description provided.

    • passwordoptionalstring

      No description provided.

    • redirectTooptionalstring

      No description provided.

Notes#

  • Requires a service_role key.
  • This function should only be called on a server. Never expose your service_role key in the browser.

Examples#

Generate invite link.#

const { data: user, error } = await supabase.auth.api.generateLink({
type: 'invite',
email: 'email@example.com'
})