2

I'm running into an issue where if a user's session is expired, next time they try to login, the login window is automatically pointed at their specific pod/mydomain. Not too bad for regular users, but for those that switch sfdc accounts often (or even use dreamforce.com) it is a pain because you need to log into the expired account and logout in order to log into any other account.

I suspect it has to do with the pod/mydomain being stored locally on a cookie or something and being used to redirect to org specific login page. If you logout explicitly (vs expire), there is no issue.

Is there a way to clear these cookies or is there a URL (other than login.salesforce.com) that ignores these cookies?

2 Answers 2

0

It's not a cookie, it is just the redirect flow. And I don't think this is an issue with pods, as pods will redirect post login - but mydomain will only log in a user from that domain (you'll get a login error otherwise).

A common flow might be:

  1. Log into login.salesforce.com
  2. Redirected to yourdomain.salesforce.com
  3. Logout / timeout and get redirected
  4. Browser is still on yourdomain.salesforce.com (but looks like login.salesforce.com)
  5. Log in as new user not on yourdomain, get login error

So if you just go back to login.salesforce.com you're OK. As for helping your users not fall into this trap, the best thing I could think of would be some kind of extension to flag / alert them somehow that they are not on login.salesforce.com. I don't know if any of the password managers out there force the URL you log into - but that might help as well.

0

The login.salesforce.com url takes url parameters, and you can just give it the startURL parameter. Moving the entire url (apart from login.salesforce.com) into the startURL will work great.

var redirectPage = 'whatever'
var url = "https://login.salesforce.com/apex/ + redirectPage;

This will always redirect them to their previously logged in Pod.

Where as this will take user to a pod agnostic login page.

var url = "https://login.salesforce.com/?ec=302&startURL=%2Fapex%2F" + redirectPage;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .