PHPackages                             groupepsih/oauth2-prosanteconnect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. groupepsih/oauth2-prosanteconnect

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

groupepsih/oauth2-prosanteconnect
=================================

Pro Sante Connect / ANS OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.0.2(3y ago)1171↓100%MITPHP

Since Oct 28Pushed 3y ago3 watchersCompare

[ Source](https://github.com/pmsipilot/oauth2-prosanteconnect)[ Packagist](https://packagist.org/packages/groupepsih/oauth2-prosanteconnect)[ RSS](/packages/groupepsih-oauth2-prosanteconnect/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

ANS / Pro Sante Connect Provider for OAuth 2.0 Client
=====================================================

[](#ans--pro-sante-connect-provider-for-oauth-20-client)

This package provides ANS / Pro Sante Connect OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

Requirements
------------

[](#requirements)

The following versions of PHP are tested:

- PHP 8.1

Some other versions may work, but are not tested at this time.

To use this package, it will be necessary to have an ANS Pro Sante Connect client ID and client secret. These are referred to as `{psc-client-id}` and `{psc-client-secret}`in the documentation.

Installation
------------

[](#installation)

To install, use composer:

```
composer require groupepsig/oauth2-prosanteconnect
```

Usage w/Symfony 6.x
-------------------

[](#usage-wsymfony-6x)

To use this with Symfony 6.x you have to add a client class in your application, something around the lines of:

```
namespace App\OAuth2\Client\Provider;

use KnpU\OAuth2ClientBundle\Client\OAuth2Client;
use League\OAuth2\Client\Token\AccessToken;
use GroupePSIH\OAuth2\Client\Provider\ProSanteConnectResourceOwner;

class ProSanteConnectClient extends OAuth2Client
{
    public function fetchUserFromToken(AccessToken $accessToken): ProSanteConnectResourceOwner|\League\OAuth2\Client\Provider\ResourceOwnerInterface
    {
        return parent::fetchUserFromToken($accessToken);
    }

    public function fetchUser(): ProSanteConnectResourceOwner|\League\OAuth2\Client\Provider\ResourceOwnerInterface
    {
        return parent::fetchUser();
    }
}
```

Use the `knpuniversity/oauth2-client-bundle`And make the appropriate modifications in the `config/packages/knpu_oauth2_client.yaml`:

```
knpu_oauth2_client:
    http_client_options:
        proxy: false
        timeout: 5
    clients:
        prosc:
            type: generic
            provider_class: App\OAuth2\Client\Provider\ProSanteConnect
            client_id: '%env(PROSC_CLIENTID)%'
            client_secret: '%env(PROSC_SECRET)%'
            redirect_route: 'prosc_oauth_check'
            redirect_params: {}
            provider_options: {'dev': true}
```

and `security.yaml`:

```
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            lazy: true
            form_login:
                login_path: prosc_oauth_login
                # for Gitlab (test)
                # login_path: gitlab_oauth_login
            guard:
                authenticators:
                    - App\Security\ProSCAuthenticator
                    # for Gitlab (test)
                    # - App\Security\GitlabAuthenticator
```

`ProSCAuthenticator` being a class extending `SocialAuthenticator` with your business logic.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

4

Last Release

1211d ago

Major Versions

0.1.0 → 1.0.0-rc12022-10-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/c45c7ed625a6c8fbfd683e62706b4cd78e53d86d861c4e5994c13c81a7cb1206?d=identicon)[thejoelinux](/maintainers/thejoelinux)

![](https://www.gravatar.com/avatar/9dbfc105bcf0b649d6336c7102ea9d0798f13ab5750fdab7fb407bb4072079c7?d=identicon)[groupepsih](/maintainers/groupepsih)

---

Top Contributors

[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (1 commits)")

---

Tags

clientAuthenticationoauthoauth2authorizationansprosanteconnect

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/groupepsih-oauth2-prosanteconnect/health.svg)

```
[![Health](https://phpackages.com/badges/groupepsih-oauth2-prosanteconnect/health.svg)](https://phpackages.com/packages/groupepsih-oauth2-prosanteconnect)
```

###  Alternatives

[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[cakedc/oauth2-cognito

Cognito OAuth 2.0 Client Provider for The PHP League OAuth2-Client

18597.7k](/packages/cakedc-oauth2-cognito)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
