For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.
Generates email links and OTPs. This will not send links or OTPs to the end user. This function is for custom admin functionality.
The type of link to generate, e.g. `LinkType.Signup`.
The redirect url to use. If you don't specify this, the platform specific will be used, like deeplinks on android.
The builder to create a new link.
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.Signup) {
email = "example@email.com"
password = "secretpassword"
}
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.Invite) {
email = "example@email.com"
}
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.MagicLink) {
email = "example@email.com"
}
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.Recovery) {
email = "example@email.com"
}
// generate an email change link to be sent to the current email address
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.EmailChangeCurrent) {
email = "example@email.com"
newEmail = "newEmail@email.com"
}
// generate an email change link to be sent to the new email address
val (url, user) = supabase.auth.admin.generateLinkFor(LinkType.EmailChangeNew) {
email = "example@email.com"
newEmail = "newEmail@email.com"
}