Generates an email link for a specific action without sending it. This is useful for custom admin functionality where you want to build the email or OTP flow yourself.
GenerateLinkParams exposes a static factory for each link type: .signUp(email:password:redirectTo:), .invite(email:redirectTo:), .magicLink(email:redirectTo:), .recovery(email:redirectTo:), .emailChangeCurrent(email:newEmail:redirectTo:), and .emailChangeNew(email:newEmail:redirectTo:).generateLink() creates the user for .signUp and .invite if one doesn't already exist.let response = try await supabase.auth.admin.generateLink(
params: .signUp(
email: "email@example.com",
password: "secret"
)
)
let actionLink = response.properties.actionLink
let response = try await supabase.auth.admin.generateLink(
params: .recovery(
email: "email@example.com",
redirectTo: URL(string: "https://example.com/reset-password")
)
)