Skip to main content
Adam Chromicz (WeWork) 님이 Salesforce Identity에 글을 올렸습니다

Hi all, I'm working on adding Embedded Login to a project that will be delivered as a Managed Package so I can allow B2C customers to login with Salesforce to external web applications.  I've been having trouble getting it to work completely, basically I can't get the JS callback function to fire.  

 

there's more details here:

https://trailblazers.salesforce.com/answers?id=9064S000000CoOm

and here:

https://salesforce.stackexchange.com/questions/314483/having-trouble-implementing-embedded-login-to-allow-users-to-signin-from-an-exte

 

Can anyone with experience in Embedded Login give me some pointers?

댓글 11개
  1. 2020년 8월 6일 오후 2:12

    Hi Nazim, thanks for the suggestion, I made sure to add the apex class (and every apex class in the org just to be sure) to that profile and also have the same result with an admin user. Also, just to be super sure, I can use the same username and password to successfully hit the endpoint in Postman.

    I think that error is generic, if I run the same command with a totally invalid token (just add a random string to it) I get the same error.

    I think my problem has to do with how I'm using my token:

    1. I generate the access_token using the client-side user agent token flow on my external website with the sfwidget JS lib

    2. I use javascript to format a request that I send to a proxy script on my external server

    3. The proxy script takes the token, packages it up with a cURL request and sends that to Salesforce where it gets this error.

    Is my session disrupted by firing the cURL event from the server rather than directly from the browser (which I can't do because of CORS)?

0/9000