Replace the Embedded Login CSS with Your Own

Embedded Login comes with a default style sheet, which styles the login button and login form. If you want to replace the default CSS with your own, you have a few options.

Warning
Warning In Summer ’24, Salesforce made Embedded Login disabled by default. We recommend that you use the web server flow, the user-agent flow, or another redirect-based OAuth 2.0 flow instead of Embedded Login.

Embedded Login relies on third-party cookies, which are blocked or restricted in most browsers. And Embedded Login works only on Google Chrome and only as long as third-party cookies are allowed there by default.

Use whichever method you prefer.

  • Override the CSS directly in the web page.
  • Edit the Embedded Login CSS. The style sheet is located in your site URL resource folder.
  • Replace the style sheet with your own by updating the link on your web page with the location of your style sheet.
    Note
    Note If you replace the style sheet, be sure to define all the necessary styling. Embedded Login doesn’t provide default styles when you supply your own CSS.