Find your content:

Search form

You are here

Is there a way to embed salesforce login screen into corporate website

 
Share

Is there a way we can have partner portal login embeded in our corporate website. The idea is to allow the login form embeded in our corporate website and when the user fills in creds and submits goes to the partner portal directly. I want avoid the one extra click of going to login page and then filling in the credentials and then going to the portal if that is possible.

When i look at the source code of the login page of partner portal

<form base_target="_top" method="POST" action="/secur/login_portal.jsp" name="login">
<input type="hidden" value="" name="startURL">
<input type="hidden" value="" name="loginURL">
<input type="hidden" value="true" name="useSecure">
<input type="hidden" value="00Di0000000xxxx" name="orgId">
<input type="hidden" value="060i0000000xxxx" name="portalId">
<input type="hidden" value="3" name="loginType">
<input type="hidden" value="loginAction" name="action">

I tried using the same on form but on submission it would take me back to standard login page of partner portal.

Any thoughts on what can be the issue Thanks


Attribution to: Prady

Possible Suggestion/Solution #1

The way you can do this is to copy the form code from the salesforce's login page by looking at the view source.

<form  base_target="_top" action="https://na15.salesforce.com/secur/login_portal.jsp" method="POST">
    <input type="hidden" value="/apex/defaultUrl" name="startURL">
    <input type="hidden" value="http://abc.com/abc" name="loginURL">
    <input type="hidden" value="true" name="useSecure">
    <input type="hidden" value="xxxi0000000xxx" name="orgId">
    <input type="hidden" value="xxxi0000000Uxxx" name="portalId">
    <input type="hidden" value="3" name="loginType">
    <input type="hidden" value="loginAction" name="action">
    <span>
    <i><img src="images/mail.png" alt="" /></i><input type="text" id="username" name="un" value="Enter your username" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Enter your username';}">
    </span>
    <span>
    <i><img src="images/lock.png" alt="" /></i>
    <input type="password" placeholder="password" id="password" name="pw">
                            </span>

    <h4><input type="checkbox" value="remember-me" id="remember_me"> Remember me</h4>

    <input type="submit" class="my-button"  value="Sign In">
    </form>

Make sure you have all the hidden variables and the name of the username and password field exactly same as its the source code of the login page of the portal


Attribution to: Prady

Possible Suggestion/Solution #2

Try using iframe on your current website that will point to login page.


Attribution to: Sagar Pareek
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31590

My Block Status

My Block Content