How to create a custom salesforce.com login page?

Can I create a custom salesforce.com login page? if possible, can anyone help create the page and part of the validation?

+4
source share
3 answers

A few things to think about:

  • Will this page be hosted on your website?
  • Will it be used for multiple Salesforce organizations?

One thing you can do is use login () to call the session id. You will be able to find out if the login failed and the user is properly notified.

From there, you will have to redirect the user through the "frontdoor.jsp" page, which has the following format:

  • HTTPS: // [host] .salesforce.com / SECUR / frontdoor.jsp ASC = [session_id] & retURL = [start_page]

Where:

  • [host] - depends on the organization. Some that I saw are na1, na2, .... If you build it for only 1 organization, you can hard code this value. If you are creating several organizations, you can analyze it from the serverUrl property returned by LoginResult .
  • [session_id] - get this from the returned LoginResult
  • [start_page] - this is optional, but can be used to "deep link" the user to the page after logging in.

Edit: 2014-08-25

Salesforce now officially supports the frontdoor.jsp login method described in this answer ( link ). In addition, session_ID tokens can be obtained from any of the following sources:

  • access_token from OAuth authentication. Please note that one of the areas specified when creating the connected application must be web or full.
  • LoginResult returns from SOAP API login call
  • Apex UserInfo.getSessionId ()
+7
source

This is possible using the Ajax Toolkit, I wrote, as I shared the code http://brianpeddle.com/2011/06/06/building-a-custom-salesforce-login/

I know this is old, but if someone has stumbled upon this, it might be helpful.

+3
source

There is information here on the Salesforce Ideas site. Salesforce.com does not currently support a custom login page, but it looks like you might be able to do this using Force.com sites .

0
source

Source: https://habr.com/ru/post/1307002/


All Articles