Link to home
Start Free TrialLog in
Avatar of alexmac05
alexmac05Flag for United States of America

asked on

How easy is it to support multiple logins to my website on one web browser session?

Problem:
I have functions on my web application such that I really need to support three different logins on one web browser session. I need it to be seamless to the user.

Is this pretty easy such that I should look into how to do it? Or is this pretty difficult?

If I login to twitter on a chrome session and then open another tab and go to twitter, it brings up the account from the other tab. If I logout then it logs me out of both tabs. So, for twitter, they're obviously not supporting multiple logins on one session.  Gmail gives us that nice choice between accounts, which is great, but for my usecase, the user basically needs to be in the dark about the different logins happening.

I'm basically just looking for an idea of how difficult or standard this functionality might be to implement. Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexmac05

ASKER

Hi Rob,

Thanks for your response.

In that case, I believe what I will do is provide a callback on the front-end javascript library that tells the programmer that they will be logged out of user1 when they hit user2 authentication, etc.

Thanks for helping me come to this conclusion.

I was thinking there would be a way to handle the session key-value pair data structure somehow and that maybe someone had thought up a way to do this.

The reason I have to do this is maybe too complicated to go into. Basically, it has to do with the fact that it is an API underneath the hood for this application that is requiring different login's but that I'm handling that authentication but trying to hide that from the user.
would love to hear if you have anything to add to my comment, but wanted to get you the points also. I hope you can still comment if you have any response to what I added.
API underneath the hood for this application that is requiring different login's but that I'm handling that authentication but trying to hide that from the user.
Thought that may be the case.  Is there a reason you're doing this on the client side and not the server?  Can you not have the user's login and have the API logins coded into the server (e.g. PHP) code?

I'm assuming that the front end user only logs in once but there are 2 other sets of credentials that are needed to access the API?  That's what should be hardcoded on the server side.

Thanks for the points :)
Anytime the login (or session) status depends on a single cookie, that cookie will be shared by ALL open windows of a browser.  I get around that by having every usable browser installed on my computer.  I have Firefox, SeaMonkey (a Firefox derivative), Chrome, and Opera on most of my computers.  And of course, having multiple computers makes it even easier.