Loading
Salesforce now sends email only from verified domains. Read More
Identify Your Users and Manage Access
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Step 4: Write Login and Logout Functions

          Step 4: Write Login and Logout Functions

          On the web page, provide a login and optional logout JavaScript function in the body to handle onLogin and onLogout events. With these functions, you determine what happens when users log in and out successfully. You have full control over what happens.

          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.

          1. Add a login function to the body of the web page.
          2. Optionally, add code to the login function to retrieve user information from Salesforce.
          3. Optionally, add a logout function to the body of the web page.
           
          Loading
          Salesforce Help | Article