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.

Swift: Send a password reset request

Parameters

Examples

Reset password

try await supabase.auth.resetPassword(
  email: "example@email.com",
  options: ResetPasswordOptions(
    redirectTo: URL(string: "my-app-scheme://callback")!
  )
)

Show the update password screen

.onOpenURL { url in
  Task {
    if case .signedIn(_, verification: .recovery)? = try await supabase.handleRedirect(url) {
      isPasswordRecovery = true
    }
  }
}

// Then, when the user submits the new password:
try await supabase.auth.updateUser(UpdateUser(password: newPassword))