Open source · 2025 Project 10 of 20
PHP OAuth
A framework-agnostic OAuth 2 library for PHP.
At a glance
- Role
- Author
- Period
- 2025
- Status
- Live
- Technologies
- 4 technologies
A lightweight OAuth 2 library that does not depend on any framework. It includes a server with the client credentials, authorization code and refresh token grants, token storage in a database through PDO or in the session, and providers for Google, Microsoft and Keycloak.
Design
- Interfaces instead of hard-wired classes. Grants and storage sit behind interfaces, so another grant type or a custom storage can be added without touching the core.
- A shared base for providers. Google, Microsoft and Keycloak all extend the same abstract provider.
- JWT. Access tokens can also be issued as JWT (firebase/php-jwt).
Built with
- PHP
- OAuth 2.0
- JWT
- PDO