views:

24

answers:

1

I get a mail in which i am given a link to a page of accounthistory page like this:

http://www.mydomain.com/accounthistory.php?order_id=491

using this i can view the order detail, but when I am logged in to my account and I access the same link copying from mail i got, I get the page but i get logged out.

this page is also available in general of my site after login and the url is displayed as

http://www.mydomain.com/accounthistory.php?order_id=491&osCsid=v2i9agpobsce2dvlfgi28449j3

hence my question is

If I am logged in my account and using the link which i got in my mail i.e. http://www.mydomain.com/accounthistory.php?order_id=491

what should i do so that i do not get logged out of my account?

after looking through the both ways, i found that i need the "osCsid" appended to my url which i got in my mail. and from debugging i found it to be saved in session.. how can I use it to get my point work?

+3  A: 

If your shop system doesn't use Cookies for sessions, carrying the session ID in the URL is in fact the only way to continue the session.

However putting the session ID into the E-Mail is not very elegant. The session ID will become invalid at some point, and it makes the URL long and ugly.

I would consider activating Cookie based authentication for those clients that accept it.

Pekka
-ve Potter, :-(, any other alternative!!
OM The Eternity
@OM alternative to what? Why are you not using Cookies?
Pekka
Regarding last line, Or is there any way to check for the existing session id and appending in requested url which I paste in address bar?
OM The Eternity
@OM nope, it's either session ID or Cookies. Why can't you use cookies?
Pekka
@OM re your update, yes there is, it's called Cookies ;) I know no other way.
Pekka
is there any way to check for the existing session id and appending in requested url which I paste in address bar?
OM The Eternity
@OM only if your session is cookie based. There is no other way. We can do this all day :P
Pekka
@Peter true, but in that case, it is probably not advisable to carry on the session by passing on the session ID.
Pekka
@Pekka - Thanks... I realized the issue was continuing an ongoing session and deleted that comment :/
Peter Ajtai