---
schema_version: "1"
id: 00c76421bab1759acaae9612567e35cd336c8191e4ef492bd45eb21df7c26292
title: Create an Embedded Login Client-Side Callback
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/external_identity_login_client_callback.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.external_identity_login_client_callback.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b098c7586e1691abfc694373017fbdcd3778f4130a244575bf6cbee3ea5fbed1
description: To create a client-side callback, you add a web page to your website and specify a few Embedded Login meta tags inside the <head> HTML element.
products:
  - Security
  - Cross Cloud
release: "264"
---
# Create an Embedded Login Client-Side Callback

To create a client-side callback, you add a web page to your website and specify a few Embedded Login meta tags inside the `<head>` HTML element.

![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-identity-264-0-0-production-enus/699dab6f-8f1a-4662-b24f-6521d5b747f7/images/icon_warning.png)

Warning In Summer ’24, Salesforce made Embedded Login disabled by default. We recommend that you use the [web server flow](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_web_server_flow.htm&type=5&language=en_US), the [user-agent flow](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_user_agent_flow.htm&type=5&language=en_US), 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.

The client-side callback takes the access token from Salesforce and writes it to local browser storage for future access. Regardless of how many web pages that you add login capabilities to, you create only one callback page.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-identity-264-0-0-production-enus/699dab6f-8f1a-4662-b24f-6521d5b747f7/images/icon_note.png)

Note For security, the callback page must be on the same domain as the web pages containing Embedded Login.

1. Create a page on your website and call it \_callback, for example, \_callback.php.
2. Enter the following required meta tags inside the `<head>` HTML element of this \_callback page.
    
    - salesforce-community
    - salesforce-allowed-domains
    - salesforce-mode (where the value ends in -callback)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-identity-264-0-0-production-enus/699dab6f-8f1a-4662-b24f-6521d5b747f7/images/icon_note.png)
    
    Note The value of the salesforce-mode meta tag is the same mode specified in the Embedded Login web page with the -callback suffix. For example, if salesforce-mode on the web page is set to modal, the value is modal-callback.
3. If desired, enter these optional meta tags.
    - salesforce-save-access-token with the value `true` to save the access token after initialization. By saving the access token, you can continue to interact with Salesforce during the active user session.
    - salesforce-logout-on-browser-close
4. Keep the body empty: `<body></body>`.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-identity-264-0-0-production-enus/699dab6f-8f1a-4662-b24f-6521d5b747f7/images/icon_example.png)

Example

```html
<html>
<head>
    <meta name="salesforce-community" content="https://embeddedlogin-dev-ed.my.site.com/demo">
    <meta name="salesforce-client-id" content="3MVG9Iu66FKeHhIPrRneLTDFdiuLfgLjycFpg6SbLpZAJScEXuD.oRdaWnJE7QGNFWHxunp0ut1">
    <meta name="salesforce-mode" content="inline-callback">
    <meta name="salesforce-save-access-token" content="false">
    <meta name="salesforce-allowed-domains" content="embeddedlogin.heroku.com">
    <meta name="salesforce-redirect-uri" content="https://embeddedlogin.heroku.com/_callback.html">
    <meta name="salesforce-target" content="#salesforce-login">
    <meta name="salesforce-login-handler" content="onLogin">
    <meta name="salesforce-logout-handler" content="onLogout">
    
    <script src="https://embeddedlogin-dev-ed.my.site.com/demo/servlet/
            servlet.loginwidgetcontroller?type=javascript_widget" async defer></script>
</head> 
<body></body>        
</html>
```