Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Redundant Login
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

miiraclle
Starting Member

7 Posts

Posted - 13 June 2007 :  12:42:25  Show Profile
I have an existing database that contains login info into my site. If a user is going to snitz through my site via links, I don't want them to have to login a second time (but they should be validated). How do I accomplish this?

The credentials for Snitz and my site are the same. However, if the user is going directly to snitz, they will have to login. I have imported the usernames and passwords into the snitz database. I MUST keep my existing database as the primary database. Also, I don't need the ability for users to register.

I know there are many topics on this, but I just can't get this to work. Do I just assign a cookie to the user? But then how do I bypass the snitz login screen?

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 13 June 2007 :  12:49:07  Show Profile  Visit HuwR's Homepage
if you have set the cookies up correctly then you should not get a snitz login screen at all.
Go to Top of Page

miiraclle
Starting Member

7 Posts

Posted - 13 June 2007 :  12:53:03  Show Profile
You're right, I was using the wrong variable for the password. Who knew it was so easy!

Thanks!!!
Go to Top of Page

miiraclle
Starting Member

7 Posts

Posted - 13 June 2007 :  12:54:23  Show Profile
Now when I click on any other link in the forum it boots me back to the login screen.. What is going on?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 13 June 2007 :  13:07:29  Show Profile  Visit HuwR's Homepage
make sure that in the forums Admin options that you have the cookie mode set to website and not forum (will need to clear out your cookies after changing this setting)

if that doesn't work, maybe you could provide a link so that we can take a look.
Go to Top of Page

miiraclle
Starting Member

7 Posts

Posted - 13 June 2007 :  13:38:33  Show Profile
I set the cookie mode to website. It seems like I can get into the forum from a link after I have logged into the site where the snitz cookie is set. However, I don't think I am truly logged into Snitz because the login/password box shows and when I click on any other link, I get the login page.

Below is my cookie code

Response.Cookies(strUniqueID & "User").Path = "/"
Response.Cookies(strUniqueID & "User")("Name") = Cust_ID 'M_NAME
Response.Cookies(strUniqueID & "User")("Pword") = password
Response.Cookies(strUniqueID & "User").Expires = Now() + 30

When I open cookies, I can see the Snitz00User Cookie, but I don't see the content with my login credentials.. What am I missing?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 13 June 2007 :  13:50:33  Show Profile  Visit HuwR's Homepage
couple of questions,
1)are you saving the encrypted or un-encrypted password in the cookie ? you need to save the encrypted password.
2) I'm not sure that now() + 30 will work, you should use dateadd to increase dates, so your problem could be that your cookie is expiring to soon, it should be something like
Response.Cookies(strUniqueID & "User").Expires = dateAdd("d", 30, now())
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 June 2007 :  13:51:15  Show Profile  Send ruirib a Yahoo! Message
Probably you have an error with the expiry date.

You should use DateAdd("d",30,Now()) instead of Now() + 30.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

miiraclle
Starting Member

7 Posts

Posted - 13 June 2007 :  14:14:06  Show Profile
I changed the expiration date of the cookie and added the password encoding and it appears to be working. I see myself actually logged in and my cookie shows my encoded password. I put a piece of the code below. Thanks!

strEncodedPassword = sha256("" & trim(password))
encpass = strEncodedPassword

Response.Cookies(strUniqueID & "User").Path = "/"
Response.Cookies(strUniqueID & "User")("Name") = Cust_ID 'M_NAME
Response.Cookies(strUniqueID & "User")("Pword") = encpass
Response.Cookies(strUniqueID & "User").Expires = DateAdd("d",30,Now())
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07