GoTrueAdminMFAApi
import type { GoTrueAdminMFAApi } from "https://esm.sh/@supabase/supabase-js@2.101.0/dist/index.d.mts";Contains the full multi-factor authentication administration API.
interface GoTrueAdminMFAApi {
deleteFactor(params: AuthMFAAdminDeleteFactorParams): Promise<AuthMFAAdminDeleteFactorResponse>;
listFactors(params: AuthMFAAdminListFactorsParams): Promise<AuthMFAAdminListFactorsResponse>;
}§Methods
§
deleteFactor(params: AuthMFAAdminDeleteFactorParams): Promise<AuthMFAAdminDeleteFactorResponse>
[src]Deletes a factor on a user. This will log the user out of all active sessions if the deleted factor was verified.
@example
Delete a factor for a user
const { data, error } = await supabase.auth.admin.mfa.deleteFactor({
id: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
userId: 'a89baba7-b1b7-440f-b4bb-91026967f66b',
})
@example
§
listFactors(params: AuthMFAAdminListFactorsParams): Promise<AuthMFAAdminListFactorsResponse>
[src]Lists all factors associated to a user.
@example
List all factors for a user
const { data, error } = await supabase.auth.admin.mfa.listFactors()
@example