Send an email invite link
Sends an invite link to an email address.
- Sends an invite link to the user's email address.
- The
inviteUserByEmail()
method is typically used by administrators to invite users to join the application. - Note that PKCE is not supported when using
inviteUserByEmail
. This is because the browser initiating the invite is often different from the browser accepting the invite which makes it difficult to provide the security guarantees required of the PKCE flow.
Parameters
email
REQUIRED
stringThe email address of the user.
options
Optional
objectAdditional options to be included when inviting.
data
Optional
objectA custom data object to store additional metadata about the user. This maps to the `auth.users.user_metadata` column.
redirectTo
Optional
stringThe URL which will be appended to the email link sent to the user's email address. Once clicked the user will end up on this URL.
const { data, error } = await supabase.auth.admin.inviteUserByEmail('email@example.com')