Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - member API
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

member API

 Post Reply Post Reply
Author
ghena View Drop Down
Newbie
Newbie


Joined: 19 December 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ghena Quote  Post ReplyReply Direct Link To This Post Topic: member API
    Posted: 19 December 2007 at 12:25pm
Hi,
 
I'm trying to use the member api to sincronyze registration in mywebsite and in the forum.
 
It works well during the first access... then, if i do a logout, and I try to access through mywebsite... the login access is not automatic.
 
I did this in the function_member_API.asp:
 
 Session("USER") = Request.Cookies("mysite")("nome")
 Session("PASSWORD") = Request.Cookies("mysite")("pwd")
 Session("EMAIL") = Request.Cookies("mysite")("email")
 
Const blnMemberAPI = True
 
Const blnMemberAPIDisableAccountControl = True
 
Const strMemberAPIRegistrationURL = "http://mysite/registrazione.asp"
 
Const strMemberAPILogoutURL = "http://mysite/logout.asp"
 
What i must to change to get an automatic login using the API ?
 
Thanks in advance.
 
 
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 11:35am
You have set this up wrong, you should be creating session variable in your own login pages and NOT passing the data across in a cookie.

You should never place username and password data in a cookie, this is a massive security risk as it allows anyone to get your users username and passwords.

You need to go back to the original member API file and follow the instructions, as at the moment it is not setup correctly.

What you should have done is edit your own login page to add in the following:-

Session("USER") = Member_Username
Session("PASSWORD") = Member_Password
Session("EMAIL") = Member_Email

Replacing the parts in red with the user login details, this can then be picked up by the forum from the ASP session.

You also need to remove the following lines that you have placed in the member API file:-

Session("USER") = Request.Cookies("mysite")("nome")
 Session("PASSWORD") = Request.Cookies("mysite")("pwd")
 Session("EMAIL") = Request.Cookies("mysite")("email")

If you are using a cookie to pass around your users usernames and passwords then you should look at redeveloping your login system as this is totally insecure as you are literally giving out your users usernames and passwords to anyone who cares to look for them.

Back to Top
ghena View Drop Down
Newbie
Newbie


Joined: 19 December 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ghena Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 11:45am
Hi,
thanks for the replay...
My care was not about security but about the autologin system...
 
I can put the pwd in a session or in a variable , but the autologin doesnt work.
 
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 12:16pm
I think you are missing the point, you have setup the member API incorrectly. You need to go back and start again, setting it up correctly by setting the session variables in your own login system, not with the member API file.

Many people use this API without problems, but you need to set it up correctly to start with, if you start messing around trying to get it to work in a way it was not built to you will have problems.
Back to Top
ghena View Drop Down
Newbie
Newbie


Joined: 19 December 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ghena Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 12:31pm
I believe is clear now...

I must change the function_member_API.asp
 
and then i must create 3 session variables as the following:
 
Session("USER") = "myuser"
Session("PASSWORD") = "mypwd"
Session("EMAIL") = "myemail"
 
during the login.
So when the user call the page /forum/default.asp
the system is able to check if it exist or jump the user to the login ?
 
 
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 1:30pm
Not quite, no.

Having the session variables set in your own login is correct.

However, if the user is not logged into your site in the current session and they browse to the forum they will be shown as a guest, they would not be loged into the forum.

If you configure the member API with a link to your sites own login system, when the user clicks the login link in Web Wiz Forums they will be directed to your own sites login.

They then log into your own site login which sets the session variables required by Web Wiz Forums member API, when they then go back to the forum they will be logged into the forum.

Once the session variables are set by your sites login Web Wiz Forums member API can read in these variables, if the user exists they are logged in as that member, if not a member record is created for them in the database.

You also need to remember session variables only last for 20 minutes after the user has left your site before they are destroyed. They are also destroyed when you close your browser.
Back to Top
jamie.townsend View Drop Down
Groupie
Groupie


Joined: 07 December 2007
Location: England
Status: Offline
Points: 114
Post Options Post Options   Thanks (0) Thanks(0)   Quote jamie.townsend Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2007 at 1:31pm
nono -
 
Remove the sessions from the function_member_api.asp
 
In your login script "for your website" you set the sessions.
Then when you navigate to the forum it will pick up those sessions and then log the user in.
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.