Skip to content

Make scope separator in GenericOAuthConfig configurable #2118

@iNaD

Description

@iNaD

Tempest version

3.9.0

PHP version

8.5

Operating system

Linux

Description

Currently the scopeSeperator option of the \League\OAuth2\Client\Provider\GenericProvider is not configurable using \Tempest\Auth\OAuth\Config\GenericOAuthConfig.

To support OIDC login correctly (e.g. providing additional scope data) the separator for scopes has to be a space %20 instead of a %2C.

Having the following change fixes this:

    public function createProvider(): AbstractProvider
    {
        return new GenericProvider([
            'clientId' => $this->clientId,
            'clientSecret' => $this->clientSecret,
            'urlAuthorize' => $this->urlAuthorize,
            'urlAccessToken' => $this->urlAccessToken,
            'urlResourceOwnerDetails' => $this->urlResourceOwnerDetails,
            'scopeSeparator' => ' ',
        ]);
    }

I don't know if the wanted fix is, to extend GenericOAuthConfig by adding scopeSeparator or a dedicated OIDC OAuth Config is wanted?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions