PHPackages                             kolyunya/oauth2-validation - 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. kolyunya/oauth2-validation

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

kolyunya/oauth2-validation
==========================

The library provides a uniform API for validation of OAuth2 access tokens of various platforms. That is using the library you can check if the access token you receive from the client is valid for a specific user of a platform.

019PHP

Since Feb 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Kolyunya/oauth2-validation)[ Packagist](https://packagist.org/packages/kolyunya/oauth2-validation)[ RSS](/packages/kolyunya-oauth2-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth validation
================

[](#oauth-validation)

Description
===========

[](#description)

The library provides a uniform API for validation of OAuth2 access tokens of various platforms. That is using the library you can check if the access token you receive from the client is valid for a specific user of a platform.

Supported platforms
===================

[](#supported-platforms)

- Facebook
- Google
- Vkontakte

Usage example
=============

[](#usage-example)

```
$userId = "User's Google ID";
$userToken = "Users's access token to your application";
$clientId = "Your Google application ID";
$googleClient = new GoogleClient($clientId);
$authenticated = $googleClient->validate($userId, $userToken);
if ($authenticated) {
    // User provided valid authentication credentials
} else {
    // User provided invalid authentication credentials
}
```

Build status
============

[](#build-status)

[![Build Status](https://camo.githubusercontent.com/5d366b461cf36e3f374e45a945acf7f22d8527b77918a48cf1ebd78a3f65b416/68747470733a2f2f7472617669732d63692e6f72672f4b6f6c79756e79612f6f61757468322d76616c69646174696f6e2e737667)](https://travis-ci.org/Kolyunya/oauth2-validation) [![License](https://camo.githubusercontent.com/72f6600eddb8895ab7bd90971cbe2faaa7c15eee1026607fa99febdbe9403ed3/68747470733a2f2f706f7365722e707567782e6f72672f6b6f6c79756e79612f6f61757468322d76616c69646174696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/kolyunya/oauth2-validation)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/633a975257cdc14b90767f62c26c5e83a7c757a4c08eb051a74a12ec1389ce18?d=identicon)[Kolyunya](/maintainers/Kolyunya)

---

Top Contributors

[![Kolyunya](https://avatars.githubusercontent.com/u/2682768?v=4)](https://github.com/Kolyunya "Kolyunya (3 commits)")

### Embed Badge

![Health badge](/badges/kolyunya-oauth2-validation/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M100](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

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

41721.2M117](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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