Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-feat-docs-5492.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Auth Methods Management component renders a complete UI for managing a user’s authentication methods. It ships as MyAccountAuthMethodsView on iOS and AuthenticatorSettingsComponent on Android, both are views that handle every enrollment, verification, listing, and removal flow using the My Account API. You do not need to orchestrate navigation, call endpoints, or manage state.

Setup requirements

Before rendering this component, follow Build a Self-Service Account Security Interface to install the SDK, configure your Auth0 tenant, and initialize the SDK with a token provider. The component reads its configuration, token provider, and passkey settings from the initialized SDK singleton.

Supported factors

The component handles every factor Auth0 supports through the My Account API. Each factor’s screens inherit the component’s active theme, read Customize Style and Themes for the full token catalog. Enable the factors you want on the Auth0 tenant; the component automatically shows and hides factors based on what the tenant exposes.
FactorWhat the component rendersSDK notes
Email OTPEmail input → 6-digit OTP verificationPlatform OTP autofill (iOS QuickType, Android keyboard autofill) works against the OTP field.
SMS OTPCountry-code picker + phone entry → 6-digit OTP verificationAndroid SMS Retriever API is not used; the SMS body has no app hash. Autofill via the system keyboard works normally.
TOTP (Authenticator app)QR code with manual-entry key → 6-digit OTP verificationRenders the standard otpauth:// payload; no custom brand logo injection into the QR.
Push notificationsQR code for Auth0 Guardian scan → “waiting for approval” stateEnd users need the public Auth0 Guardian app. Enterprise customers with a branded Guardian SDK build must surface their own install link outside the component.
PasskeysEducational screen → OS biometric prompt → enrolled entry in the listRequires Apple Associated Domains (iOS 16.6+) or Digital Asset Links (Android 14+). See the dedicated page for app-side platform setup.
Recovery codesDisplay-once code list with copy action + “I’ve saved my codes” confirmationCodes are displayed to the user and never returned to the caller. Copy-to-clipboard uses the platform’s standard clipboard API.

Getting started

Place the MyAccountAuthMethodsView() component anywhere in your SwiftUI hierarchy, typically behind a settings navigation link.
SettingsView.swift
import SwiftUI
import Auth0UniversalComponents

struct SettingsView: View {
    var body: some View {
        NavigationStack {
            List {
                NavigationLink(destination: MyAccountAuthMethodsView()) {
                    Label("Authentication Methods", systemImage: "lock.shield")
                }
            }
            .navigationTitle("Account Settings")
        }
    }
}
The view takes no initializer parameters. All customization happens through SwiftUI view modifiers and environment values.

Parameters

The MyAccountAuthMethodsView component has a no-argument initializer. Its behavior is customized through view modifiers and environment values.
Modifier / environmentTypePurpose
.auth0Theme(_:)Auth0ThemeOverride design tokens — colors, typography, spacing, radius, sizes. To learn about token references, read Customize Style and Themes.
.embeddedInNavigationStack()Mark the view as embedded in a host NavigationStack so the SDK pushes onto your stack instead of creating its own.
\.hostNavigationPathBinding<NavigationPath>Environment binding the SDK uses to push destinations onto the host navigation stack. Required when you call .embeddedInNavigationStack().

Customization

Theming is applied to the component as a whole; individual factor screens inherit the active theme.Pass a custom Auth0Theme to override design tokens across every screen the component renders.
MyAccountAuthMethodsView()
    .auth0Theme(
        Auth0Theme(
            colors: DefaultAuth0ColorTokens(
                background: DefaultAuth0BackgroundColorTokens(primary: Color("BrandBlue")),
                text: DefaultAuth0TextColorTokens(onPrimary: .white)
            )
        )
    )
For the full token catalog and dark-mode patterns, read Customize Style and Themes.

Advanced Embed in a host NavigationStack

By default the MyAccountAuthMethodsView component manages its own NavigationStack.If your application already owns a navigation stack, nesting a second stack breaks back-button behavior and swipe-to-go-back gestures. Auth0 recommends to embed the MyAccountAuthMethodsView component into your stack instead.
import SwiftUI
import Auth0UniversalComponents

struct AccountScreen: View {
    @State private var path = NavigationPath()

    var body: some View {
        NavigationStack(path: $path) {
            List {
                NavigationLink("Authentication methods", value: "auth-methods")
            }
            .navigationDestination(for: String.self) { value in
                if value == "auth-methods" {
                    MyAccountAuthMethodsView()
                        .embeddedInNavigationStack()
                }
            }
        }
        .environment(\.hostNavigationPath, $path)
    }
}
There are two requirements when using embedded mode:
  1. Apply .embeddedInNavigationStack() to MyAccountAuthMethodsView so it skips creating an inner stack.
  2. Add \.hostNavigationPath on the outer NavigationStack so the SDK knows which path binding to push onto.
The SDK also exposes a Router helper class for applications that want a type-safe navigation controller for their own routes. It is not required to drive the SDK’s internal navigation only use it if you want to apply the same pattern to your application’s screens.

Localization

The iOS SDK does not currently ship localized strings. User facing copy is presented in English. If localization is a blocker for your integration, file a feature request against the ui-components-ios SDK.

Limitations

  • No standalone factor components on iOS. Every factor renders inside the Auth Methods Management component. There is no public API to enroll, verify, or remove a single factor from a different part of your application.
  • No standalone list/remove components. Neither SDK ships public components for listing enrolled factors or removing them outside the component. Use the Auth methods component for the full management experience.
  • Post-login passkey prompts are not supported. Prompting a user to save a passkey immediately after sign-in (separate from the settings screen) is not covered by this SDK today. You can track ui-components-ios and universal-components-android for updates.

Learn more

Build a Self-Service Account Security Interface

Initialize the SDK and wire the token provider to your Auth0 tenant.

Customize style and themes

Override colors, typography, spacing, radius, and size tokens using the Auth0 design-token system.