Solved

Auto logging into forums on a different website.

Posted on 2011-03-23
8
338 Views
Last Modified: 2012-05-11
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,
0
Comment
Question by:onBasics
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 17

Expert Comment

by:Shinesh Premrajan
ID: 35204919
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
0
 

Author Comment

by:onBasics
ID: 35206043
What kins of script are we talking about here?
Can you provide an example?

Thank you!
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35208049
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
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:onBasics
ID: 35388022
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!
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 35389521
Just put the communication behind HTTPS and let the protocol do the encryption for you.  Almost like magic, and very easy to get right!
0
 

Author Comment

by:onBasics
ID: 35443738
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!
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 35447136
Uhh, get two SSL certificates, one for each domain, right?  Then access each domain via HTTPS.
0
 

Author Comment

by:onBasics
ID: 35961323
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.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question