Flutter: Generate an email link (original) (raw)

Generates email links and OTPs to be sent via a custom email provider.

Parameters

(Required)
The type of invite link to generate.

(Required)
Email address of the user to invite.

(Optional)
Password for the user. Required for `signup` type.

(Optional)
URI to redirect the user to after they open the invite link.

(Optional)
A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.

Examples

final res = await supabase.auth.admin.generateLink(
  type: GenerateLinkType.signup,
  email: 'email@example.com',
  password: 'secret',
);
final actionLink = res.properties.actionLink;