Author |
Topic  |
|
tolsky
Starting Member
23 Posts |
Posted - 28 September 2004 : 15:35:29
|
I'm trying to change the strUniqueID variable from "Snitz00" to "Valence". I'm integrating my forum into another web page on a different subdomain and want to share cookie variables so I named my cookie "ValenceUser". I created a login for my other site that creates the appropriate cookie variables and logs you into Snitz along with my other pages. This part works fine. However when I try to use Snitz's login with strUniqueID = "Valence", I enter my id and password, it says login successful and then it redirects me back to the login page. When I change strUniqueID back to "Snitz00" it then works fine. Does anyone have any idea why this is and how I can solve this problem? |
Edited by - tolsky on 28 September 2004 15:36:21 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
tolsky
Starting Member
23 Posts |
Posted - 28 September 2004 : 17:38:04
|
Alright, I tried that and I'm getting some interesting results.
If I login on my page at abc.domain.com it logs me into both my page and the Snitz forum. If I log out from that page it logs me out of both my page and the Snitz forum. However if I don't logout and try clicking the logout button on Snitz, it says I am logged out but then it loads the forum back up and I'm still logged in (even when I reload).
Now if close the browser and start a new session. I can go to snitz.domain.com and I can login and logout perfectly fine. I can also log into my page while logged into Snitz perfectly fine (logging into Snitz isn't set up to log you into my page, I'm not going to be using the Snitz login ever). However, if I log out of my page I am still logged into Snitz. Now if I log out of Snitz, which works fine, and then try logging into my page, I can log into my page but i will not be logged into Snitz. I would have to log back in using Snitz to access Snitz in this case.
Now all I really care about is being able to log into my page and being able to click the logout button in Snitz to log out of both pages. They use the same cookie name and are on the same domain (just different subdomains) so this should be doable.
Here is the code I use for creating a cookie on my page (I haven't changed the Snitz code for creating cookies):
Response.Cookies("ValenceUser").Domain = "domain.com" Response.Cookies("ValenceUser")("Client") = rs2.Fields("Client") Response.Cookies("ValenceUser")("SQL") = rs2.Fields("SQL") Response.Cookies("ValenceUser")("admin") = 1 Response.Cookies("ValenceUser")("PCP") = rs2.Fields("pcp") Response.Cookies("ValenceUser")("spec") = rs2.Fields("spec") Response.Cookies("ValenceUser")("group") = rs2.Fields("group") Response.Cookies("ValenceUser")("Name") = request.form("login") Response.Cookies("ValenceUser")("Pword") = request.form("password")
And the rs2 recordset and form fields are populated. And don't worry about the encryption on the Snitz password, I removed that from Snitz.
Thanks.
Ben
quote: Originally posted by ruirib
Change strUniqueID to the value you wish. Then delete your cookies, close all browser windows and then try logging in again.
|
 |
|
tolsky
Starting Member
23 Posts |
Posted - 28 September 2004 : 17:42:19
|
I should also mention that along with being on different subdomains the pages are also on two different servers.
Ben |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
tolsky
Starting Member
23 Posts |
Posted - 28 September 2004 : 18:02:22
|
No, my page uses the following code:
Response.Cookies("ValenceUser").Domain = "domain.com" Response.Cookies("ValenceUser")("Client") = "" Response.Cookies("ValenceUser")("SQL") = "" Response.Cookies("ValenceUser")("code") = "" Response.Cookies("ValenceUser")("admin") = 0 Response.Cookies("ValenceUser")("PCP") = "" Response.Cookies("ValenceUser")("spec") = "" Response.Cookies("ValenceUser")("group") = "" Response.Cookies("ValenceUser")("Name") = "" Response.Cookies("ValenceUser")("Pword") = ""
Snitz still uses its ClearCookies subroutine:
sub ClearCookies() if strSetCookieToForum = 1 then Response.Cookies(strUniqueID & "User").Path = strCookieURL else Response.Cookies(strUniqueID & "User").Path = "/" end if Response.Cookies(strUniqueID & "User") = "" Session(strCookieURL & "Approval") = "" Session.Abandon 'Response.Cookies(strUniqueID & "User").Expires = dateadd("d", -2, strForumTimeAdjust) end sub
I tried replacing the subroutine's code with my code but it didn't work, it actually made it worse because it wouldn't let me log out of Snitz even when I had originally logged in using Snitz.
Ben
quote: Originally posted by ruirib
Are you executing the same code when logging out from your page and from Snitz?
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 30 September 2004 : 05:08:30
|
You need to delete the cookies every time you try new code that changes the way cookies are created or changed. So maybe try your code again, after deleting cookies and see if that helps. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
|
Topic  |
|