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 1w 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 12% 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://avatars.githubusercontent.com/u/2682768?v=4)[Nick Oleynikov](/maintainers/Kolyunya)[@Kolyunya](https://github.com/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

[tg/tgwebvalid

An easy way to validate Telegram Login Widget and Telegram Mini App users on your website using PHP

6827.5k1](/packages/tg-tgwebvalid)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[kissdigital-com/apple-sign-in-client-secret-generator

PHP package for generating 'client secret' for Sign In with Apple

2125.5k](/packages/kissdigital-com-apple-sign-in-client-secret-generator)[denniseilander/laravel-passport-scopes-restriction

Restrict scopes for different Laravel Passport clients.

1636.3k](/packages/denniseilander-laravel-passport-scopes-restriction)

PHPackages © 2026

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