0

I'm attempting to implement Embedded Login so my external web apps can leverage SalesForce as a logged in user of a Community. I'm able to get a successful login however the login js function does not fire which breaks the whole experience.

I'm developing this solution for a managed package and using the full SFDX development cycle and environments so I'm always pointing my login pages to a scratch org which may be the problem? (more info on my environment setup at the bottom)

I've followed all the steps here at least 3 times and am at a loss for why: https://developer.salesforce.com/docs/atlas.en-us.externalidentityImplGuide.meta/externalidentityImplGuide/external_identity_login_intro.htm

My login form is here: https://www.flxos.io/Sample-Login/old_index.html

and my callback is here: https://www.flxos.io/Sample-Login/_callback.html

I've done everything from setting the CORS for my domain, wildcard subdomains and root domain to creating and delegting the apps at least 3 times.

The Situation: When I use the Popup style i'm able to login within the popup, the popup disappears however nothing happens on the original page, my JS callback function is not executed and I do not get the identity variables. However, if I then navigate to my community I'm logged in within the same browser so SalesForce is setting a token.

I can't get the modal style to actually show me the login form and I'm not sure why.

There's not a lot of info out there, I found this mention but they've long since fixed their typo: Embedded Login, onLogin function not being called after successful login

Here's hoping someone has worked with Embedded Login flows!

As mentioned, here's my environment setup: Salesforce Partner Business Org with Developer Hub on and My domain setup Developer edition connected with a namespace created

Scratch Orgs created from this config:

{
  "orgName": "adamchromicz company",
  "edition": "Developer",
  "namespace": "flxos", 
  "features": ["PersonAccounts", "Communities", "ExternalIdentityLogin"],
  "settings": {
    "lightningExperienceSettings": {
        "enableS1DesktopEnabled": true
    },
    "securitySettings": {
        "passwordPolicies": {
            "enableSetPasswordInApi": true
        }
    },
    "mobileSettings": {
        "enableS1EncryptedStoragePref2": false
    },
    "communitiesSettings": {
        "enableNetworksEnabled": true
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.