Link to home
Start Free TrialLog in
Avatar of onBasics
onBasics

asked on

Auto logging into forums on a different website.

Hello All,
I'm in the process of integrating my forums (vBulletin4) with my website. My website (Wordpress) and my forums are not on the same server. I need assistance with how to pass vBulletin authentication to a different server.

Example: my website is located at www.website.com and that is where my users will login, when they click on the forums links they will be taken to www.forums.com. I need to have them be automatically logged in when they reach www.forums.com. They will have matching credentials on both website.com and forums.com.

Thanks much,
Avatar of Shinesh Premrajan
Shinesh Premrajan
Flag of India image

Its seems more like a SSO integration to your website, But this can be resolved without actuially implementing the SSO totally.

Since the user details are same for both the sites, You need to create a script that will encrypt the username and password and send this to a link in the forums website, forums website will decrypt the details and chk both the credentials locally which definately will be sucess, hence allowing the user to logged in to the forums

Hope this helps
Avatar of onBasics
onBasics

ASKER

What kins of script are we talking about here?
Can you provide an example?

Thank you!
You may not find a ready-made example, but I can tell you some of the concepts you have to deal with.  First of all, if you can do it, make the forums have a URL like www.website.com/forums/ -- if you can do that, you can use setcookie() in the login process for www.website.com to permit the cookie to be visible to all sub-directories.  This will work nicely with session cookies.  I think you will find that easiest.

If you MUST have different domain names, then you have a couple of choices.  Sending the credentials by using CURL POST method is certainly one way to try it.  But bear in mind that the cookie that gets set by the login process on the forums site will be sent to the script that initiated the CURL call.  I don't know how you might put this cookie on the client browser, since it will be a cookie for a different domain.  I would expect that the client browser would reject that.

You might have a login hook in the forums site.  When the client goes from WP to the forum, your login script for the forum would call a web service script on the WP site, saying in effect, "is this client already logged in?"  The WP script could use its cookie to verify the client status and return a yes/no signal to the forums site.  I think for this to work, the login status on the WP site might need to be kept in a persistent cookie - not sure about that.

In any case, give yourself some time for the development here.  You will probably find that WP and vBulletin have lots of layers of code that stand between you and any easy, direct implementation.  Good luck with it, ~Ray
After a lot of experimenting, we have decided to just do the whole encryption -> decryption option.  However, I have concerns with the safety of this.  What is a good way to pass the information from one website to another without compromising security?  Also, what is a good way to encrypt information and then be able to decrypt it.  I know how to salt passwords and such but they are all one way encryption .

If at all possible, can you please provide an example of this?

Thanks!
Just put the communication behind HTTPS and let the protocol do the encryption for you.  Almost like magic, and very easy to get right!
Can you give some stepping stones to work with?
With an SSL certificate, isn't that only for 1 domain? How can we make this work since its 2 different domains.

Tia!
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America 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
Thanks for the help.
We actually moved the forums and website all to the same server to get rid of the possible problems and create a strong environment in the future.

Going to award you the points because this is a great thread to have archived.