# OAuth 2.0 Client

> PHP League's base library for OAuth 2.0 sign-in with any provider

Source: https://talira.ai/catalog/oauth-2-0-client-3wh4kc1s
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / libraries](https://talira.ai/categories/security/auth/libraries), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Supports: [OAuth 2.0](https://talira.ai/standards/oauth-2-0.md)[^1]
- Backed by: [The League of Extraordinary Packages](https://talira.ai/orgs/thephpleague.md)

OAuth 2.0 Client (league/oauth2-client) is a PHP library from The PHP League that gives an application a base for the OAuth 2.0 login flow behind "Connect with Google/GitHub" buttons, without handling the details of RFC 6749 itself. It works with any provider that follows the OAuth 2.0 Authorization Framework, and its GenericProvider connects to any service that uses Bearer tokens. Official League clients and third-party ones extend it for providers such as Facebook, GitHub, Google, Instagram and LinkedIn, and you can write your own.

## Links

- Website: https://oauth2-client.thephpleague.com/
- GitHub: https://github.com/thephpleague/oauth2-client
- Docs: https://oauth2-client.thephpleague.com/usage/

## Problems it solves

- add 'Sign in with Google' and GitHub login to my PHP app without writing the OAuth flow myself
- connect a PHP backend to an OAuth 2.0 API that issues Bearer tokens
- support several OAuth providers in PHP behind one interface

## Features

- GenericProvider for any OAuth 2.0 service using Bearer tokens
- official League and third-party provider clients
- a guide to writing your own provider client
- PSR-1, PSR-2, PSR-4 and PSR-7 compliant

## Limitations

- Needs PHP 8.2 or later.[^1]

## Trust

Overall: 0.55 out of 1.
Signals: maintenance 0.65, adoption 0.72, momentum 0.42, community 0.95, backing 0.30, extensibility 0.00.

- last commit 9 days ago
- 7 commits in the last 90 days
- latest release 2.10.0 9 days ago
- 3.8k GitHub stars
- 242 contributors
- backed by The League of Extraordinary Packages

## Sources

[^1]: https://github.com/thephpleague/oauth2-client/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/thephpleague/oauth2-client/blob/master/LICENSE (checked 29 Nov 2026)
