OAuth2 authentication provider in Neos - is there a stable base to extend?

Hi @floweiss1

I used the package

as base for a generic Oauth authentification that looks like this

I relies on the implementation of the PHP Leaguge packages, but gives me the chance of creating new OAuth authentication provider by passing a array to the authentication providers configuration given the keys that the PHP League requires to do “the talking”.

          'FacebookProvider':
            provider: Vendor\Application\Security\Authentication\Oauth\Provider\FacebookProvider
            providerOptions:
              implementationClassName: League\OAuth2\Client\Provider\Facebook
              implementationClassOptions:
                clientId: 'CLIENT_ID'
                clientSecret: 'SECRET_KEY'
                graphApiVersion: 'v2.8'
          'LinkedinProvider':
            provider: Vendor\Application\Security\Authentication\Oauth\Provider\LinkedinProvider
            providerOptions:
              implementationClassName: League\OAuth2\Client\Provider\Linkedin
              implementationClassOptions:
                clientId: 'CLIENT_ID'
                clientSecret: 'SECRET_LEY'

and as you can see, the FacebookProvider class doesn’t do anything else than pass a token class and a name of the object managing response from the specific provider.

I hope that it can help you or others :slight_smile:

2 Likes