Solved

Auto logging into forums on a different website.

Posted on 2011-03-23
8
332 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 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