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
Now, update the settings of the Two-Factor Authentication plugin:
279
+
280
+
```tstittle="./resources/adminuser.ts"
281
+
plugins: [
282
+
newTwoFactorsAuthPlugin ({
283
+
twoFaSecretFieldName: 'secret2fa',
284
+
timeStepWindow: 1
285
+
//diff-add
286
+
passkeys: {
287
+
//diff-add
288
+
credentialResourceID: "passkeys",
289
+
//diff-add
290
+
credentialIdFieldName: "credential_id",
291
+
//diff-add
292
+
credentialMetaFieldName: "meta",
293
+
//diff-add
294
+
credentialUserIdFieldName: "user_id",
295
+
//diff-add
296
+
settings: {
297
+
//diff-add
298
+
rp: {
299
+
//diff-add
300
+
name: "New Reality",
301
+
//diff-add
302
+
id: "localhost",
303
+
//diff-add
304
+
},
305
+
//diff-add
306
+
user: {
307
+
//diff-add
308
+
nameField: "email",
309
+
//diff-add
310
+
displayNameField: "email",
311
+
//diff-add
312
+
},
313
+
//diff-add
314
+
authenticatorSelection: {
315
+
//diff-add
316
+
authenticatorAttachment: "platform",
317
+
//diff-add
318
+
requireResidentKey: true,
319
+
//diff-add
320
+
userVerification: "required",
321
+
//diff-add
322
+
},
323
+
//diff-add
324
+
},
325
+
//diff-add
326
+
}
327
+
}),
328
+
],
329
+
```
330
+
331
+
The setup is complete. To create a passkey:
332
+
333
+
> 1) Go to the user menu
334
+
> 2) Click settings
335
+
> 3) Select "passkeys"
336
+
337
+

338
+
339
+
> 4) Add passkey
340
+
341
+

342
+
343
+
344
+
After adding passkey you can use passkey, instead of TOTP:
345
+
346
+

347
+
348
+
> 💡 **Note**: Adding a passkey does not remove the option to use TOTP. If you lose access to your passkey, you can log in using TOTP and reset your passkey.
0 commit comments