Loading
Identify Your Users and Manage Access
Add Embedded Login Meta Tags to Your Web Page

Add Embedded Login Meta Tags to Your Web Page

You enter meta tags on your web page where you want to add login capabilities with Embedded Login. You specify the Salesforce site URL, what the login form looks like, and the location of the CSS style sheet.

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.

On the web page where you want to add to login capabilities, add Embedded Login information within the <head> HTML element.

  1. Open the web page that you want to add login capabilities to.
  2. In the <head> HTML element at the top of the file, enter these required meta tags, specifying the values from your configuration.
    • salesforce-community
    • salesforce-client-id
    • salesforce-redirect-uri
    • salesforce-mode
    • salesforce-target
    • salesforce-login-handler
    • salesforce-logout-handler
    • salesforce-server-callback (required if you’re using a server-side callback)
  3. Optionally, enter these meta tags.
    • salesforce-forgot-password-enabled
    • salesforce-self-register-enabled
    • salesforce-register-starturl-enabled
    • salesforce-mask-redirects
    • salesforce-use-min-js
    • salesforce-cache-max-age
    • salesforce-save-access-token
  4. Enter the link to the location of CSS resources. The CSS resides on a static endpoint hosted by your site.

    <link href="https://embeddedlogin-dev-ed.my.site.com/demo/servlet/servlet.loginwidgetcontroller?type=css" rel="stylesheet" type="text/css" />

  5. Add this Embedded Login script, replacing the site URL https://embeddedlogin-dev-ed.my.site.com/demo with your own.
    <script src="https://embeddedlogin-dev-ed.my.site.com/demo/servlet/servlet.loginwidgetcontroller?type=javascript_widget" async defer></script>
 
Loading
Salesforce Help | Article