XF 2.3 XenForo as an OAuth client

FKO

New member
Hello everyone,
I do understand XenForo 2.3 added the ability to act as an OAuth provider. However, I'd like to do the opposite. I do have a Wordpress installation which I want to use as an OAuth provider, and XenForo as a client, i.e., such that users can log-in to XenForo with their Wordpress account. Basically, I want the Wordpress user database to be my SSO provider.

I might be missing the documentation here, or is this really not currently a possibility? Would anyone be able to point me into the direction to achieve that?

I'm aware of the XFtoWP third-party plugin allowing me to do the same, but that one looks orphaned and I can no longer purchase it. Does anyone know of any other alternative I could look into to get accounts synchronized between WP and XF?
 
I might be missing the documentation here, or is this really not currently a possibility?
XenForo 2.3 can act as an OAuth2 client for
  • Apple
  • Facebook
  • GitHub
  • Google
  • Linkedin
  • Microsoft
  • X
  • XenForo 2.3+ (or anything else that provides endpoints that are XenForo compatible)
  • Yahoo
Without custom code it can't act as an OAuth2 client for anything else.

Would anyone be able to point me into the direction to achieve that?
Implement a XenForo connected account provider for your target OAuth2 provider.

This isn't complicated, in many (most?) cases it's basically just a bunch of boilerpate code to extend three classes:

XF\ConnectedAccount\Provider\AbstractProvider
XF\ConnectedAccount\ProviderData\AbstractProviderData
OAuth\OAuth2\Service\AbstractService

Which Plug-in do you use to add an OAuth2 provider on Wordpress?

Does anyone know of any other alternative I could look into to get accounts synchronized between WP and XF?
OAuth wouldn't do that anyway, it just allows a consumer to authenticate via a provider.
 
Hi Kirby,

thanks for your reply.
Which Plug-in do you use to add an OAuth2 provider on Wordpress?
I haven't chosen one yet. I am working on a POC setup, and have no strong preferences. There seem to be multiple providers available, and from reading through, both the Miniorange WP OAuth Server, as well as OAuth2 Provider seem promising.

This isn't complicated, in many (most?) cases it's basically just a bunch of boilerpate code to extend three classes:

Yeah, my issue there is, that I haven't written any PHP in 15 years or so. I doubt I could manage to do that myself in a reasonable time. Hence I'm merely stuck to look for off the shelf solutions.

OAuth wouldn't do that anyway, it just allows a consumer to authenticate via a provider.

You're right, sorry for my wording. OAuth doesn't do, but the WP-to-XF plugin would do. Honestly, I have no strong preferences whether the accounts are actually duplicated, or just the authentication is relayed. In the end, I want users to get a forum account automatically when signing up to Wordpress (so long as they're in a certain WP user group).

I can't switch provider/client around either, because I have other plugins that do actually create the WP account in the first place (through CiviCRM), and I figured WP ain't the worst choice as a central backend piece due to its popularity.
 
Last edited:
Back
Top Bottom