function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
akellyakelly 

VisualForce Error re-logging in

I've got a Site connected to a Partner Portal, and if the user logs in on a browser, then closes the tab, then opens a new tab to login again, they are kicked out the VisualForce error page after they enter their credentials.  They will be continually kicked out the error page on login attempts until their original session times out.  This seems to be related to cookies or the session tracking in the browser because if they try to login via another browser, or if they clear their browser cache, they are able to login successfully.

 

Any suggestions?

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

this might be a caching related if you are using a free edition or a production org.

you might want to try again by adding the cache="false" to the page tag (if you are template then to the template)

 

All Answers

BulentBulent

take a look at the sample site header component. It has the conditional link rendering logic (login vs. logout link)

You can do two things:

1- conditionally include the login component. If the user already logged in then tell them they are already logged in

2- detect they are logged in and log them out on the login page to force them to login again. 

akellyakelly

I've tried using the logic from the header component that checks $User.UserType, but on the login page, the system thinks the user is not logged in.  It's not until they attempt to login that there seems to be some sort of conflict with the existing session.

BulentBulent

this might be a caching related if you are using a free edition or a production org.

you might want to try again by adding the cache="false" to the page tag (if you are template then to the template)

 

This was selected as the best answer