0

I have a usecase where I need to enable internal users to login to Salesforce using a branded login page. We have built this login page(html) in our website using Angular.js with its own custom branding. Now the requirement is users needs to use this login page and entering their Salesforce username and password , they should be able to login to Salesforce home page.

My understanding is that we can use frontdoor.jsp and pass SESSION ID as an input parameter to achieve this requirement. So I have got the session Id through OAUTH flow( using postman) and copy pasted the session id in the URL. however it's not working and redirected to Salesforce login page .

Is there anyone done similar implementation before ? Is there any alternative way to achieve the results (without using SSO).?

1

Using the frontdoor.jsp to get a session id is not a supported way of logging in, it might work, but salesforce can change the implementation at any time.

What you are trying to do sounds a IDP initiated single-sign on. Ideally your page would authenticate the user, and generate a SAML assertion that salesforce can consume to let the user in.

I highly encourage you to stay away from trying to re-create the wheel with a custom page unless there's a strong reason to do so.

0

Take a look at Embedded Login - it is a Salesforce-provided JS wrapper that uses OpenID Connect underneath the hood. You embed a small component into your app and use that component to manage your authentication and/or user registration.

-1

You can use below to direct login but this is not recommended, But this will work for time being.

https://login.salesforce.com/login.jsp?un=<appendusername>&pw=<appendpassword>
  • Embedding the username and the password in the url doesn't sound like a smart idea. – Folkert Jan 6 at 11:09
  • Thanks for your comment but it is clearly mentioned it is not recommended. This is just a workaround. The community will be grateful if you put some more insight. How you are going to retrieve or store that information is a different discussion. – Avijit Chakraborty Jan 7 at 2:33

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.