PHPackages                             stccorp/yahoo-oauth2 - 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. stccorp/yahoo-oauth2

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

stccorp/yahoo-oauth2
====================

Libary to authenticate Yahoo users using Oauth2

016PHP

Since Sep 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/stccorp/yahoo-oauth2)[ Packagist](https://packagist.org/packages/stccorp/yahoo-oauth2)[ RSS](/packages/stccorp-yahoo-oauth2/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

yahoo-oauth2
============

[](#yahoo-oauth2)

create a yconfig.php

```
require_once 'vendor/autoload.php';

use stccorp\YahooAuth\YahooClient;

const YAHOO_CLIENT_ID = 'Your client Id';
const YAHOO_CLIENT_SECRET = 'Your Secret';
const YAHOO_REDIRECT_URI =  'Your Redirect Url';

$_SESSION['nonce'] = bin2hex(random_bytes(128/8));//so I can check the input later

$yahoo_client = new YahooClient();
$yahoo_client->setClientId(YAHOO_CLIENT_ID);
$yahoo_client->setClientSecret(YAHOO_CLIENT_SECRET);
$yahoo_client->setRedirectUri(YAHOO_REDIRECT_URI);
$yahoo_client->addScope('openid');
$yahoo_client->setNonce($_SESSION['nonce']);
```

You will have a page with the Yahoo login button , let say index.php

```
require_once 'yconfig.php';

$yahoo_login_btn = '';
```

Then you will need a yahoo\_callback.php

```
require_once 'yconfig.php';

if (strlen($_GET['code'] ?? '') > 0) {
  $token = $yahoo_client->fetchAccessTokenWithAuthCode($code);

   if (!$token->hasData()) {
      die("No Data");
   }

   $yahoo_client->setTokens($token);

   $data_json = $yahoo_client->getUserInfo();
   $data = json_decode($data_json);
}
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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/bebc02e10367036b8e54945b64377b172db243e4b818a378b574515fb91e9048?d=identicon)[stccorp](/maintainers/stccorp)

---

Top Contributors

[![stccorp](https://avatars.githubusercontent.com/u/8180135?v=4)](https://github.com/stccorp "stccorp (22 commits)")

### Embed Badge

![Health badge](/badges/stccorp-yahoo-oauth2/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/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.2M118](/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)
