Fixed Connected Account type XenForo does not work if target is not running at domain root

Kirby

Well-known member
Affected version
2.3.0 Beta 4
XF\ConnectedAccount\Service\XenForo.php

PHP:
public function getAuthorizationEndpoint(): Uri
{
    $provider = $this->getProvider();
    $endpoint = new Uri($provider->options['board_url']);
    $endpoint->setPath('/oauth2/authorize');

    return $endpoint;
}

public function getAccessTokenEndpoint(): Uri
{
    $provider = $this->getProvider();
    $endpoint = new Uri($provider->options['board_url']);
    $endpoint->setPath('/api/oauth2/token');

    return $endpoint;
}

This generates URLs that point to domain root, not necessarily the path specified by $provider->options['board_url']; in is this is a subdirectory the requests might/will fail.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 8).

Change log:
Append path when setting XenForo connected account endpoints
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom