You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/routes/account/index.openapi.json
+35-10Lines changed: 35 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -284,22 +284,47 @@
284
284
"post": {
285
285
"operationId": "AddMfaVerification",
286
286
"summary": "Add a MFA verification",
287
-
"description": "Add a MFA verification to the user, a logto-verification-id in header is required for checking sensitive permissions. Only WebAuthn is supported for now, a new identifier verification record is required for the webauthn registration verification.",
287
+
"description": "Add a MFA verification to the user, a logto-verification-id in header is required for checking sensitive permissions.",
288
288
"requestBody": {
289
289
"content": {
290
290
"application/json": {
291
291
"schema": {
292
-
"properties": {
293
-
"newIdentifierVerificationRecordId": {
294
-
"description": "The identifier verification record ID for the new WebAuthn registration verification."
295
-
},
296
-
"type": {
297
-
"description": "The type of the MFA verification."
292
+
"oneOf": [
293
+
{
294
+
"type": "object",
295
+
"properties": {
296
+
"type": {
297
+
"type": "string",
298
+
"enum": ["WebAuthn"],
299
+
"description": "The type of the MFA verification."
300
+
},
301
+
"newIdentifierVerificationRecordId": {
302
+
"type": "string",
303
+
"description": "The identifier verification record ID for the new WebAuthn registration verification."
304
+
},
305
+
"name": {
306
+
"type": "string",
307
+
"description": "The name of the MFA verification, if not provided, the name will be generated from user agent."
"description": "The name of the MFA verification, if not provided, the name will be generated from user agent."
312
+
{
313
+
"type": "object",
314
+
"properties": {
315
+
"type": {
316
+
"type": "string",
317
+
"enum": ["TOTP"],
318
+
"description": "The type of the MFA verification, for TOTP, one user can only bind one TOTP factor."
319
+
},
320
+
"secret": {
321
+
"type": "string",
322
+
"description": "The TOTP secret for the MFA verification. Use the generate endpoint to create a secret, and verify the generated code with the user before binding to make sure the user has setup the secret in their authenticator app."
0 commit comments