Skip to content

forcedotcom/sf-skills / plugins/builder/experience-react/skills/experience-ui-bundle-mfa-configure

experience-ui-bundle-mfa-configure

Verified

Configure Multi-Factor Authentication (MFA) for Salesforce Experience Site users. TRIGGER when: user wants to enable MFA on a community, enforce two-factor authentication for portal users, add MFA to a React Experience Site / Web App, configure ForceTwoFactor permission, create MFA permission sets for external users, or troubleshoot MFA not appearing on login. Also triggers on: MFA community, two-factor portal, ForceTwoFactor permission set, MFA Experience Cloud, MFA React site, identity verification community, MFA experience site, ForceTwoFactor permissionset-meta.xml, MFA permissionset-meta.xml. DO NOT TRIGGER when: configuring org-wide MFA for internal users (that's Setup > Identity Verification), building custom login UI components (use experience-ui-bundle-frontend-generate), or generating generic permission sets without MFA context (use platform-permission-set-generate).

references/branding.md

View on GitHub
# Customizing MFA / Login Page Branding

The MFA challenge page and login page are platform-rendered. Their branding is controlled by `NetworkBranding` metadata, not by React components or custom LWC.

## When to use

- User wants custom logo on the MFA/login page
- User wants branded footer text or accent color
- MFA page shows default Salesforce branding and user wants it customized

## Important notes

- **Site Containers (React sites):** The branding admin UI is available in Setup → Digital Experiences → Login Settings (since 264) — the "Login & Registration" branding section is shown even before any branding is configured. Use it to set logo, colors, and footer. Metadata API deployment still works and is the option for scripted/repeatable setup.
- Branding applies to the vforcesite-domain pages (login, MFA challenge, password reset)

## Retrieve existing branding

Create a package.xml manifest at `manifest/branding-pkg.xml` in the project (a
plain file write — avoid a shell heredoc, since `<<EOF` and `/tmp` are not
portable to Windows cmd/PowerShell) with this content:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>*</members>
    <name>NetworkBranding</name>
  </types>
  <version>62.0</version>
</Package>
```

Then retrieve from the org:

```bash
sf project retrieve start --target-org <org-alias> \
  --manifest manifest/branding-pkg.xml \
  --target-metadata-dir ./branding-retrieve --unzip
```

## NetworkBranding metadata fields

| Field | Purpose | Notes |
|-------|---------|-------|
| `loginLogo` | Logo image on login/MFA page | Reference to a static resource or content asset |
| `loginFooterText` | Footer text below the form | Plain text, no HTML |
| `loginPrimaryColor` | Accent color for buttons/links | Hex color code (e.g., `#0070D2`) |
| `loginBackgroundColor` | Page background color | Hex color code |
| `pageFooter` | Footer content for community pages | Separate from login footer |

## Deploy custom branding

After modifying the `networkBranding-meta.xml` file:

```bash
sf project deploy start --target-org <org-alias> \
  --source-dir force-app/main/default/networkBranding --test-level NoTestRun
```

## Troubleshooting

| Issue | Resolution |
|-------|------------|
| Branding not appearing | Ensure at least one non-default value is set (logo or footer text) |
| Login Settings branding section missing in Setup | Site Containers (React) show the Login & Registration branding section (since 264); if it's missing, confirm the org is on 264+. Metadata API deployment works regardless. |
| Logo not displaying | Verify the static resource or content asset is deployed and accessible to guest users |
| Changes not visible | Clear browser cache or test in incognito — branding is cached aggressively |
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall