# thephpleague/oauth2-client

Easy integration with OAuth 2.0 service providers.

Repository: https://github.com/thephpleague/oauth2-client
Canonical: https://ross.abutalabs.com/products/oauth2-client
Homepage: http://oauth2-client.thephpleague.com
Language: PHP
License: MIT
License Family: permissive
Topics: php, oauth2, oauth, authorization, sso, authentication
Last push: 2026-08-10T02:52:27+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 34, longevity 100
- inputs: {"age_days": 4964, "days_push": 23, "days_rel": 281, "gap_med": 174.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3817, forks 769 (observed 2026-08-28T04:08:20.977771+00:00)

## What it is
A PHP library providing a base client for integrating with OAuth 2.0 service providers per RFC 6749. It includes a GenericProvider for Bearer-token providers and supports extension via official and third-party provider packages.

## Use cases
- add 'Sign in with Google' to a PHP web app
- implement OAuth 2.0 login flow with Facebook or GitHub
- connect to any OAuth 2.0 provider using bearer tokens
- build a custom provider client for a proprietary API
- add single sign-on to a PHP application

## When to choose
- you need OAuth 2.0 client functionality in a PHP project
- your provider conforms to the OAuth 2.0 Authorization Framework
- you want a well-maintained, PSR-compliant base with an ecosystem of provider packages

## When to avoid
- you need OAuth 1.0a support
- a dedicated provider client package already covers your provider without needing the base
- you need a full identity/SSO server rather than a client

## Facets
- artifact type: library
- maturity: stable
- function: auth, http-client, sdk
- domain: security, web-development, apis
- platform: php
- tags: oauth2, sso, authentication, composer, psr-compliant

## Member repositories
- thephpleague/oauth2-client (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:20.977771+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:32.212285+00:00, confidence not recorded.
  - readme: https://github.com/thephpleague/oauth2-client (fetched 2026-08-28T04:08:20.977771+00:00, sha 444f71a6dd91)
  - homepage: http://oauth2-client.thephpleague.com (fetched 2026-08-29T09:21:22.265787+00:00, sha 43e6b56b80fd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
