import { supabase } from "https://deno.land/x/live@1.60.21/deps.ts";
const { GoTrueAdminApi } = supabase;
Properties
mfa: GoTrueAdminMFAApi
Contains all MFA administration methods.
Methods
createUser(attributes: AdminUserAttributes): Promise<UserResponse>
Creates a new user.
This function should only be called on a server. Never expose your service_role
key in the browser.
deleteUser(id: string, shouldSoftDelete?: boolean): Promise<UserResponse>
Delete a user. Requires a service_role
key.
generateLink(params: GenerateLinkParams): Promise<GenerateLinkResponse>
Generates email links and OTPs to be sent via a custom email provider.
getUserById(uid: string): Promise<UserResponse>
Get user by id.
inviteUserByEmail(email: string, options?: { data?: object; redirectTo?: string; }): Promise<UserResponse>
Sends an invite link to an email address.
listUsers(params?: PageParams): Promise<{ data: { users: User[]; aud: string; } & Pagination; error: null; } | { data: { users: []; }; error: AuthError; }>
Get a list of users.
This function should only be called on a server. Never expose your service_role
key in the browser.
signOut(jwt: string, scope?: "global" | "local" | "others"): Promise<{ data: null; error: AuthError | null; }>
Removes a logged-in session.
updateUserById(uid: string, attributes: AdminUserAttributes): Promise<UserResponse>
Updates the user data.