nuxt-x-auth-nile
MfaSetup
MFA enrollment with QR code and setup key for authenticator apps, or email OTP.
MfaSetup
Enrolls an already signed-in user. The layer ships the component; add it on a profile/security page (the sample uses /protected). There is no default /auth/mfa-setup route.
Do not paste the otpauth URL into Google Authenticator or Authy. Scan the QR, or use Enter a setup key with the secret.
Setup does not start on mount. The user clicks “Show authenticator QR” or “Send email code” so you do not POST a second method over an in-flight authenticator challenge (Nile 404 “Not found”).
<XAuthMfaSetup method="authenticator" @complete="onMfaEnabled" />
| Prop | Type | Default | Description |
|---|---|---|---|
method | 'authenticator' | 'email' | 'authenticator' | Factor to enroll |
| Event | Description |
|---|---|
complete | Confirmation code verified; MFA is on |
Email MFA needs a verified address and is a different mail than signup verification. A 404 is a missing challenge — email MFA may be off in the Nile console, or the address is unverified. A bad confirm code keeps the form visible (“Code not accepted”).
AI Context
component: XAuthMfaSetup
package: "@xenterprises/nuxt-x-auth-nile"
use-when: >
Enroll MFA while signed in. Show QR + setup key; never paste otpauth URLs.
Do not auto-start email MFA over authenticator setup.
