Ask Search:
Adam LeipoldAdam Leipold 

custom login page for standard user

I found this post but I'm missing something...

In a post on the Force.com discussion boards Mandeep Deka writes, "Check out this link Custom Salesforce Login I have customized it further to use it according to my requirement. The Sites page is available publicly and with the right credentials, a authenticated user can log in and land on the home page of Salesforce."

I created a Site, but the login settings only gives me No Login Allowed or Login Enabled for Partner Portal.

How can I login to a site and re-direct a Standard CRM licensed user as described above?

Mandeep's Force.com post is here http://boards.developerforce.com/t5/forums/replypage/board-id/Visualforce/message-id/41768
Best Answer chosen by Moderator (salesforce.com) 
KC ShaferKC Shafer
Okay, sorry it took me a minute there, I was doing some reading on this and some testing in a dev org. What you would need to do is make the login visualforce page, your active home page. That way it will be the first page landed on in your site, or the only page since you wouldn't have any others I suppose. Then use use Brian's method with the visualforce page and the ajax toolkit to build the login.

--KC

All Answers

KC ShaferKC Shafer
After reading Brian Peddle's blog post here: http://brianpeddle.com/2011/06/06/building-a-custom-salesforce-login/ , it looks like what he did was use a visualforce page in the force.com site and the ajax toolkit to run the login and allow the error messages to flow back through to the login screen rather than redirect to standard salesforce page. 

I've never done that before, but after reading through the posts quick, it seems like the most secure method presented to meet this need, rather than passing paremeters through a url. 

--KC
Adam LeipoldAdam Leipold
KC, Thanks for going thorugh the post. My question is how do you configure that?  I created a Site, but the login settings only gives me No Login Allowed or Login Enabled for Partner Portal. How do I configure the site to use this VF page I created (Custom Login Page)  as the landing page for the site?
KC ShaferKC Shafer
Okay, sorry it took me a minute there, I was doing some reading on this and some testing in a dev org. What you would need to do is make the login visualforce page, your active home page. That way it will be the first page landed on in your site, or the only page since you wouldn't have any others I suppose. Then use use Brian's method with the visualforce page and the ajax toolkit to build the login.

--KC
This was selected as the best answer
Adam LeipoldAdam Leipold
KC - Your last response helped a lot. There's a few more things to it that Brian Peddle's blog post  doesn't clearly spell out. Here's all the changes I made:
  1. Create a Force.com Site without a suffix
  2. Create a custom login Visualforce page and use Brian's apex class headerUtility
  3. Make the custom login visualforce page the Site active home page
  4. Add the Site URL to Remote Site Settings
  5. Make sure your IP address is within the Trusted IP Range in Network Settings

I noticed that my custom login page didn't work exactly like the Salesforce.com login page, It didn't Make Setup My Default Landing Page (I have that checked on my User Profile), and it still takes me to Salesforce.com on logout. But it works! I now have a nicely branded login page.
jaba rajjaba raj
HI Adam ,

Can you please share the code ,i have similar requirement .

i have to change the standard login page for chatter user.Is It possiable by Brian Peddle's blog post? or it is used only for portal users