added the auth.mfa.listFactors() method to @supabase/supabase-js sdk reference doc

This commit is contained in:
Supun Sudaraka committed 2024-10-28 23:03:02 +05:30
1 parent e1c8713221
commit c239a0830e
2 files changed
+61 -1

No files matched your search

@@ -677,6 +677,13 @@
"product": "auth",
"type": "function"
},
{
"id": "mfa-list-factors",
"title": "List factors",
"slug": "auth-mfa-listfactors",
"product": "auth",
"type": "function"
},
{
"id": "mfa-get-authenticator-assurance-level",
"title": "Get Authenticator Assurance Level",
@@ -749,7 +756,7 @@
"type": "function"
},
{
"id": "mfa-list-factors",
"id": "mfa-list-factors-admin",
"title": "List all factors for a user",
"slug": "auth-admin-mfa-listfactors",
"product": "auth-admin",
+53
View File
@@ -2420,6 +2420,59 @@ functions:
error: null
}
```
- id: mfa-list-factors
title: 'mfa.listFactors()'
$ref: '@supabase/auth-js.GoTrueMFAApi.listFactors'
examples:
- id: list-all-enrolled-factors
name: List all enrolled factors
isSpotlight: true
code: |
```js
const { data, error } = await supabase.auth.mfa.listFactors()
```
response: |
```json
{
data: {
all: [{
id: '<ID>',
friendly_name: 'Auth App Factor',
factor_type: 'totp',
status: 'verified',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z'
}, {
id: '<ID>',
friendly_name: 'Auth Phone Factor',
factor_type: 'phone',
phone: '<PHONE_NUMBER>',
status: 'verified',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z'
}],
totp: [{
id: '<ID>',
friendly_name: 'Auth App Factor',
factor_type: 'totp',
status: 'verified',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z'
}],
phone: [{
id: '<ID>',
friendly_name: 'Auth Phone Factor',
factor_type: 'phone',
phone: '<PHONE_NUMBER>',
status: 'verified',
created_at: '2024-01-01T00:00:00Z',
updated_at: '2024-01-01T00:00:00Z'
}]
},
error: null
}
```
- id: admin-api
title: 'Overview'
notes: |