It seems there are additional permissions added to the /users API endpoint in versions >1.5.1 that cause the authorization flow to fail.
Topic on Extension talk:XenForoAuth/Flow
Just ran into this also, anyone have a workaround / solution? BD API 1.6.1 is required for PHP 7.2
What is the exact error message you get? And what additional permissions you've in mind?
This is the message I get when clicking "Login with Xenforo" using the latest version (1.6.1) of [bd] API:
The external site refused to authenticate you or encountered an error. Please try it again or contact the administrator of the site. The message was:
On the [bd] API discussion page I saw another user post with these details:
GET /api/index.php?users/me
Request
array(0) {
}
Response (403)
array(1) {
["error"] => string(34) "You must be a logged-in, registered member of this site to perform this action. "
}
It would seem that "users/me" doesn't behave the same in 1.6.x as it did in 1.5.x. Forum posts on th haven't been responded to, sadly.
@Florianschmidtwelzow is there any update on a fix?
Hi, sorry for not replying earlier :( Unfortunately I do not plan to maintain this extension anymore. I do not have any usage of this extension anymore, neither have I any way to test the actual implementation (as I do not own a XenForo installation). So, until anyone want to take over the maintenance of his extension, it is unmaintained and should not be used anymore :( Best, Florian
@Tiggleshorts @TheRealFunar Good news - with [bd] API 2.0.1 beta (I'm running the latest Xenforo 2.1.5), this is working properly again. The client setup is slightly different, but otherwise everything works as expected.
@Formina Sage Excellent news, I'm just working on moving to Xenforo 2.1 now. I will check it out, thank you!!
@Formina Sage I think I have it set up properly with Xenforo 2.1.6, MediaWiki 1.34.0 and [bd] API 2.0.1 Beta 1 but am seeing this error when clicking the 'login with Xenforo' button. Did your run into this?
Error from line 321 of .../extensions/XenForoAuth/includes/auth/XenForoPrimaryAuthenticationProvider.php: Class 'XenForoBDClient\Clients\OAuth2Client' not found
Update: I got it working by: 1. running composer update in the extensions/XenForoAuth/ directory (didn't see this in the directions) which added the missing files. 2. running maintenance/update.php again 3. turning off basic auth I had on my test site. Looking good!
Triggleshorts, I managed to get to the point you were at but can't run composer. What is actually missing?
I have everything setup but not having any luck, Not sure what to set for
$wgXenForoAuthClientId = '';
Going round in circles and the error logs in Xenforo keep showing not matter what I do.
array:1 [ "errors" => array:1 [ 0 => "requested_page_not_found" ] ]
@SyrinxCat Sorry I didn't see the previous message, were you able to get it working?
I just upgraded to the latest MediaWiki v1.39.1 and I did not run into any issues, still working fine.
@Tiggleshorts. No problem. I did eventually get it working yes. Took some messing about but got there in the end :)
Awesome!