Jump to content

External Login/API functions


Kerblooy

Recommended Posts

I want to setup an external login for my IPB 4, setting up multiple different areas of the site and I want them to all share the same login.  I had files and knew how to do this with IPB 3 but obviously they no longer work with IPB 4 mainly because the files like ipsregistry and ipscontroller are no longer in the same place.  Can anyone help me figure out the new method for doing these things?

 

thanks for any help

Link to comment
Share on other sites

I was looking at this too, the SSO is red herring, it's SSO for other IPB apps, not a true single sign on multi-platform solution. 

The outline is to have the forum be a part of a larger eco system of applications. Applications not made in PHP nor even related to forums. Lets say a finance check, or insurance quote; motoring related site, either way, applications or services that are not plugins to the forum code base. 

So:

  • www.example.com
  • forums.example.com
  • accounts.example.com
  • rubyApp1...
  • nodeApp2...
  • phpApp3...

:smile: So we wrote a quick ruby 'accounts' app to handle all user registration and login/out, it's a dirty hack using plain text to get us moving. Connect some oauth for a separate news app, sign in to news app using oauth[1] provided by accounts. 

:thumbsup: Next we configure IPB to use external database. Create a user in the accounts db and I can login to the forums just fine, looking good!

:unsure: Now, lets handle registration. If I disable registration in forums, I can't register. I can create the user over in the accounts app, when they hit the forums they cannot complete the 'registration' as registration is disabled. Ok, sort of makes sense.

:cry: Enable registration and the users are sent to the forum registration bypassing our account app.

>_< The flip is to give the forum code what it wants. Simply for it to be the central golden repository of users and connect our other services to that... 

This is going back a few months before IPB4 was released, but it was enough to leave me scratching my head how this can be done.

Without:

  • Rewriting registration link to accounts - tempting ;)
  • Altering/overwriting core forum code, forum code needs to be up-datable and standard as much as possible.
  • Not using plain text or md5 ;) ( Needs new PHP login handler : ok |> works  )
  • Avoids PlanZ of creating a 'services' domain [ exampleservices.com ], that is different and is a wholly separate registration, but this is 2 registrations hell!

I don't think the 3rd party db login support has been thought through from a perspective that the forum isn't the canonical owner of user data. Unless and I sincerly hope this is the case, I've missed something stupidly obvious.

 

[1] Of course this is not a golden path. Sign in on oauth, crucially sign out does not signout out of the other app. That is you sign into forumx using facebook auth, you're logged into facebook when you logout of forumx. The trick is to cancel  the sign in token after signing in on the auto provider. When you sign out of the forum, you're already signed out of accounts. The con is you head to portal app and you need to sign in. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...