Skip to main content
The Prompts resource allows you to configure Universal Login settings including Identifier First Authentication and WebAuthn with Device Biometrics for MFA.

Methods

Get Settings

Retrieve details of the Universal Login configuration of your tenant.
func (c *Client) GetSettings(
    ctx context.Context,
    opts ...option.RequestOption,
) (*management.GetSettingsResponseContent, error)
GetSettingsResponseContent
object

Example

ctx := context.Background()

settings, err := mgmt.Prompts.GetSettings(ctx)
if err != nil {
    log.Fatalf("Error getting prompt settings: %v", err)
}

fmt.Printf("Universal Login Experience: %s\n", settings.GetUniversalLoginExperience())
fmt.Printf("Identifier First: %t\n", settings.GetIdentifierFirst())
fmt.Printf("WebAuthn Platform First Factor: %t\n", settings.GetWebauthnPlatformFirstFactor())

Update Settings

Update the Universal Login configuration of your tenant.
func (c *Client) UpdateSettings(
    ctx context.Context,
    request *management.UpdateSettingsRequestContent,
    opts ...option.RequestOption,
) (*management.UpdateSettingsResponseContent, error)
request
*management.UpdateSettingsRequestContent
required

Example

updateRequest := &management.UpdateSettingsRequestContent{
    UniversalLoginExperience: management.UniversalLoginExperienceEnumNew.Ptr(),
    IdentifierFirst: management.Bool(true),
    WebauthnPlatformFirstFactor: management.Bool(false),
}

updatedSettings, err := mgmt.Prompts.UpdateSettings(ctx, updateRequest)
if err != nil {
    log.Fatalf("Error updating prompt settings: %v", err)
}

fmt.Printf("Updated Universal Login Experience: %s\n", 
    updatedSettings.GetUniversalLoginExperience())

Universal Login Experience Enum

The UniversalLoginExperienceEnum type represents the login experience:
const (
    UniversalLoginExperienceEnumNew     UniversalLoginExperienceEnum = "new"
    UniversalLoginExperienceEnumClassic UniversalLoginExperienceEnum = "classic"
)

Example Usage

// Set to new experience
experience := management.UniversalLoginExperienceEnumNew

// Use Ptr() method to get pointer for optional fields
updateRequest := &management.UpdateSettingsRequestContent{
    UniversalLoginExperience: experience.Ptr(),
}

Nested Resources

The Prompts client provides access to nested resources:
  • mgmt.Prompts.CustomText - Manage custom text for prompts
  • mgmt.Prompts.Partials - Manage prompt partials
  • mgmt.Prompts.Rendering - Manage prompt rendering settings

Best Practices

Identifier First Authentication

Enable Identifier First to improve user experience by allowing users to enter their identifier (email/username) first, then Auth0 determines the appropriate authentication method.

WebAuthn with Device Biometrics

Use WebAuthn with Device Biometrics as a first factor for passwordless authentication with enhanced security.

Build docs developers (and LLMs) love