The PHPer's Guide to OAuth

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • oauth

  • I put together this sample project, which leverages two libraries created by The PHP League and will be discussed in the following sections of this article. If you want to follow along, go ahead and clone the repository.

  • OAuth 2.0 Client

    Easy integration with OAuth 2.0 service providers.

  • For the client side, I'll be using the library league/oauth2-client.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • PHP Dotenv

    Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.

  • Here, I'm using the vlucas/phpdotenv library to process .env files.

  • Nyholm PSR-7

    A super lightweight PSR-7 implementation

  • Since the library is designed to be easily integrated with different frameworks, it relies on the usage of PSR-7 compliant HTTP messages. To fulfill this requirement, I'll be using the nyholm/psr7 package.

  • http-message

    The purpose of this PSR is to provide a set of common interfaces for HTTP messages as described in RFC 7230 and RFC 7231

  • Since the library is designed to be easily integrated with different frameworks, it relies on the usage of PSR-7 compliant HTTP messages. To fulfill this requirement, I'll be using the nyholm/psr7 package.

  • skeleton

    A skeleton repository for League Packages (by thephpleague)

  • I put together this sample project, which leverages two libraries created by The PHP League and will be discussed in the following sections of this article. If you want to follow along, go ahead and clone the repository.

  • PHP OAuth 2.0 Server

    A spec compliant, secure by default PHP OAuth 2.0 Server

  • For the server side, I'll use the OAuth 2.0 server library. The implementation here is more complex, as there are many moving parts that need to be in place.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts