• 0 Votes
    2 Posts
    328 Views
    F
    If an admin user is locked out due to MFA, you have several options: Use Recovery Codes (if available): If the user previously generated recovery codes, they can use one of those codes to complete the MFA challenge and regain access. Once logged in, they can disable or reconfigure MFA. Generate Recovery Codes via API: Another admin with API access can generate recovery codes for the locked-out user using the Generate Recovery Codes API endpoint: POST /api/user/two-factor/recovery-code/{userId} Replace {userId} with the locked-out user's ID. This will generate new recovery codes that can be shared with the user to complete their MFA challenge. Have Another Admin Disable MFA: If you have another admin user with access to the FusionAuth admin UI, they can navigate to the locked-out user's account and disable MFA directly from the user management interface. Users with the admin role can remove MFA methods from any user without requiring a one-time verification code. Navigate to Users → Manage User → Multi-Factor tab, click the red trash can icon next to the MFA method, and confirm the removal. Use the User API to Remove MFA: An admin with API access can also remove MFA methods by updating the user object directly. Retrieve the user via the User API, remove the methods from the twoFactor array, and then PUT the updated user back. Note that you must use PUT (not PATCH) due to how array handling works: # Retrieve the user curl -XGET -H "Authorization: $API_KEY" \ 'https://your-fusionauth-url/api/user/{userId}' # Remove the twoFactor array entries and PUT the user back curl -XPUT -H 'Content-type: application/json' \ -H "Authorization: $API_KEY" \ 'https://your-fusionauth-url/api/user/{userId}' \ -d '{user object with twoFactor array cleared}' Important Note: The standard Disable Multi-Factor API (DELETE /api/user/two-factor/{userId}) is not suitable for this situation, as it requires a valid verification code or recovery code from the user to complete the request. This API is designed for users who can still authenticate. These approaches allow you to restore access without losing the security benefits of MFA for other users. Related Documentation Multi-Factor Authentication (MFA) - Disable MFA on a User Generate Recovery Codes API Retrieve Recovery Codes API Recovery Codes Overview Disable Multi-Factor API (requires verification code - not suitable for locked-out users) The mfa_deleter Role (for support teams with restricted permissions) User Support Guide - Remove an MFA Method
  • 0 Votes
    2 Posts
    404 Views
    F
    To migrate a user from Microsoft Authenticator to 1Password (or any other TOTP authenticator app), the recommended approach is to remove the old method first, then have the user re-enroll with the new app. Step 1: Prompt the user to enroll with 1Password The user can add a new authenticator method via: Self-service account management (paid plans): User navigates to their account page → Manage two-factor → Add two-factor → Authenticator app Scan the new QR code with 1Password, including providing a name See: Add Authenticator as a second factor You can also build your own page using the APIs. This approach ensures a clean transition between authenticator apps without conflicts or confusion. Step 2: Remove the existing Microsoft Authenticator method You have two options: Option A: Admin UI Navigate to Users → [Select User] → Multi-Factor tab Click the red trash icon to remove the authenticator method An admin role can do this without requiring a one-time code from the user An mfa_deleter role can do this, but confirmation from the user is required. See: Disable MFA documentation Option B: User API (programmatically) GET the user object Remove the authenticator entry from the twoFactor.methods array PUT the updated user object back This requires no code from the user and is useful for support scenarios (e.g., user lost their device) Note: Use PUT rather than PATCH due to how arrays are handled in the API This approach ensures that the user always has MFA enabled, but requires action on their part. If you reverse them, but use an MFA policy of Required (or one of the intelligent MFA policies), then users will be forced to re-enroll. Related Documentation Multi-Factor Authentication (MFA) Overview Disable MFA on a User Add Authenticator as a Second Factor Self-Service Account Management Update a User API Disable Multi-Factor API
  • 0 Votes
    2 Posts
    402 Views
    F
    Finding Users with Email MFA Configured You can search for users with email MFA using the query string pattern in either the Admin UI search bar or via the Search API: twoFactor.methods.method:email This follows the same pattern used for searching users by any MFA method. Getting an Accurate Count Efficiently To get a count without retrieving all user records, use the Search API with accurateTotal enabled and a minimal numberOfResults: { "search": { "accurateTotal": true, "queryString": "twoFactor.methods.method:email", "numberOfResults": 1, "startRow": 0 } } The response will include a total field containing the exact count of matching users. Last-Used MFA Information Unfortunately, FusionAuth does not store a timestamp for when a user last used their MFA method. However, each MFA method object includes a lastUsed boolean field at users[x].twoFactor.methods[x].lastUsed that indicates which method was most recently used by that user. This is a boolean flag rather than a timestamp, so you can identify which method was used last but not when it was used.
  • 0 Votes
    2 Posts
    765 Views
    F
    Unfortunately, Passkeys cannot currently be used as an MFA method in FusionAuth's native hosted MFA flow. There is an open feature request for this functionality. Workaround You can implement a step-up authentication pattern using FusionAuth's WebAuthn API: After the user completes email + password login, your application calls /api/webauthn/start The authenticator produces a signature Your application calls /api/webauthn/assert to verify possession of the passkey Only grant access if the assertion succeeds You can check whether a user has a registered passkey by calling /api/webauthn?userId={userId}. Important limitation: This workaround runs in your application code, not inside FusionAuth's hosted MFA screen. Passkeys will not appear alongside email and authenticator app in the same native picker — you would need to build that UI and enforcement logic yourself in your application. A feature request has been logged for native passkey MFA support in FusionAuth's hosted flow. Related Documentation Authentication With WebAuthn & Passkeys - Complete guide to implementing WebAuthn/passkeys in FusionAuth WebAuthn API Reference - API endpoints for starting and completing WebAuthn authentication ceremonies Start a WebAuthn Passkey Assertion - Documentation for the /api/webauthn/start endpoint Retrieve a Passkey - How to check if a user has registered passkeys using /api/webauthn?userId={userId} Multi-Factor Authentication (MFA) - Overview of FusionAuth's native MFA methods (TOTP, email, SMS) Step-Up Authentication - General guidance on implementing step-up auth patterns in FusionAuth Can I do a step up authentication with WebAuthn/passkeys? - Community discussion on this exact use case
  • 0 Votes
    2 Posts
    514 Views
    F
    Currently, FusionAuth does not support recovery code regeneration within the hosted account pages, and there are no plans on the public roadmap for this feature. Regarding your specific questions: Hosted account page support: There is no current support for recovery code regeneration as a themeable template in the hosted account pages. Recovery codes are only generated and displayed when a user first enables an MFA method. As of version 1.68.0, recovery codes are hashed at rest using salted-pbkdf2-hmac-sha256 and cannot be retrieved after initial generation—they can only be regenerated through the API. This would need to be submitted as a feature request. JWT authentication for the generate endpoint: The generate recovery codes endpoint (POST /api/user/two-factor/recovery-code/{userId}) currently only supports API key authentication. There is no JWT authentication variant available, and nothing in the current documentation or public roadmap indicates one is planned. Recommended approach: Submit feature requests for both capabilities through the FusionAuth GitHub Issues repository. These features could be valuable for self-service MFA management scenarios. Note that feature requests, if accepted, do not have guaranteed timelines for implementation. Current workarounds: You would need to implement this functionality in your own application with server-side code that uses an API key to call the generate recovery codes endpoint, though this moves the functionality outside the hosted pages where other MFA management occurs. When new codes are generated, all existing recovery codes are invalidated and replaced with a new set of 10 codes. Related Documentation Multi-Factor Authentication (MFA) - Recovery Codes - Overview of how recovery codes work in FusionAuth Generate Recovery Codes API - API endpoint documentation for programmatic recovery code generation Self-Service Account Management - Documentation on the hosted account pages and available features Customizing Self-Service Account Management - Guide for customizing hosted account page templates API Authentication - Documentation on API key and JWT authentication methods FusionAuth 1.68 Release Notes - Hashed Recovery Codes - Information about recovery code hashing security enhancement
  • 404 /api/two-factor/login

    General Discussion two-factor api
    3
    0 Votes
    3 Posts
    5k Views
    E
    We managed to figure it out. It was a build error where IntelliJ was not updating the dependency. Thanks for the help.