PHPackages                             noriel0010/third-party-sso - 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. noriel0010/third-party-sso

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

noriel0010/third-party-sso
==========================

PHP Library to verify and validate 3rd party AccessToken/IdToken from different Social Media (facebook, microsoft, google, linkedin and apple) and authenticate a User with mentioned social media id

1.0.0(5y ago)6482MITPHPPHP ^7.1

Since Mar 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/noriel0010/third-party-sso)[ Packagist](https://packagist.org/packages/noriel0010/third-party-sso)[ RSS](/packages/noriel0010-third-party-sso/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Third Party SSO Authenticator
=============================

[](#third-party-sso-authenticator)

[![Latest Version](https://camo.githubusercontent.com/0240a334343795bcf92fccaabb093418a64f0b5e7e357dbb711ee062874da136/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e6f7269656c303031302f74686972642d70617274792d73736f2e7376673f7374796c653d666c61742d737175617265)](https://github.com/noriel0010/third-party-sso/releases)

Installation
------------

[](#installation)

Install this library through [Composer](https://getcomposer.org/).

`composer require noriel0010/third-party-sso`

Sample Usage
------------

[](#sample-usage)

```
use Noriel\SSO\Auth\Service\ThirdPartyService;

$service = new ThirdPartyService();

try {
    $apple = $service->apple('apple.identity.token', 'your.app.as.audience')->authenticate();
    $facebook = $service->facebook('facebook.access.token')->authenticate();
    $google = $service->google('google.access.token', 'google_key')->authenticate();
    $linkedin = $service->linkedin('linkedin.access.token')->authenticate();
    $microsoft = $service->microsoft('microsoft.access.token')->authenticate();
} catch (\Throwable $th) {
    echo $th->getMessage();
}
```

The `authenticate()` method returns [Object Data Type](https://www.php.net/manual/en/language.types.object.php)

Apple
-----

[](#apple)

For Apple, this assumes that you already have generated [identityToken](https://developer.apple.com/documentation/authenticationservices/asauthorizationsinglesignoncredential/3153080-identitytoken) either from [accessToken](https://developer.apple.com/documentation/authenticationservices/asauthorizationsinglesignoncredential/3153077-accesstoken) or from [refresh\_token](https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens#3605122). Remember that *identityToken* is valid ONLY for 10 minutes.

#### Uses

[](#uses)

- [Apple ID API](https://appleid.apple.com/)
- [Lcobucci JSON Web Token 3.3.3](https://github.com/lcobucci/jwt#jwt)
- [Guzzle](https://docs.guzzlephp.org/en/stable/)
- `https://appleid.apple.com` as Default `issuer`

#### Test

[](#test)

To test Apple, you can paste your freshly generated *identityToken* in `test/Apple/AppleTest.php:24` and your `audience` in `test/Apple/AppleTest.php:25` then run `.\vendor\bin\phpunit test/Apple`.

Facebook
--------

[](#facebook)

For Facebook, this assumes that you already have generated [accessToken](https://developers.facebook.com/docs/graph-api/using-graph-api/#access-tokens).

#### Uses

[](#uses-1)

- [Graph Facebook v4.0](https://developers.facebook.com/docs/graph-api)
- [Guzzle](https://docs.guzzlephp.org/en/stable/)
- `id,name,email` as Default [Facebook Fields](https://developers.facebook.com/docs/graph-api/using-graph-api/#fields)

#### Test

[](#test-1)

To test Facebook, you can paste your freshly generated *accessToken* in `test/Facebook/FacebookTest.php:24` then run `.\vendor\bin\phpunit test/Facebook`.

Google
------

[](#google)

For Google, this assumes that you already have generated [accessToken](https://developers.google.com/identity/protocols/oauth2#2.-obtain-an-access-token-from-the-google-authorization-server.) and [Google API key](https://cloud.google.com/docs/authentication/api-keys).

#### Uses

[](#uses-2)

- [Google Person API v1](https://developers.google.com/people)
- [Guzzle](https://docs.guzzlephp.org/en/stable/)
- `names,emailAddresses` as Default [Google personFields Query Parameter](https://developers.google.com/people/api/rest/v1/people/get?hl=en#query-parameters)

#### Test

[](#test-2)

To test Google, you can paste your freshly generated *accessToken* in `test/Google/GoogleTest.php:24` and your `key` in `test/Google/GoogleTest.php:25` then run `.\vendor\bin\phpunit test/Google`.

LinkedIn
--------

[](#linkedin)

For LinkedIn, this assumes that you already have generated [accessToken](https://docs.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin/consumer/context#step-2-generate-an-access-token).

#### Uses

[](#uses-3)

- [Linkedin API v2](https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api?context=linkedin/consumer/context#request)
- [Guzzle](https://docs.guzzlephp.org/en/stable/)
- `(elements*(handle~))` as Default [Linkedin Email Projection](https://docs.microsoft.com/en-us/linkedin/shared/api-guide/concepts/projections?context=linkedin/context)

#### Test

[](#test-3)

To test Linkedin, you can paste your freshly generated *accessToken* in `test/Linkedin/LinkedinTest.php:24` then run `.\vendor\bin\phpunit test/Linkedin`.

Microsoft
---------

[](#microsoft)

For Microsoft, this assumes that you already have generated [accessToken](https://docs.microsoft.com/en-us/graph/auth/auth-concepts?context=graph%2Fapi%2F1.0&view=graph-rest-1.0#access-tokens).

#### Uses

[](#uses-4)

- [Graph Microsoft API v1](https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0&preserve-view=true)
- [Guzzle](https://docs.guzzlephp.org/en/stable/)

#### Test

[](#test-4)

To test Microsoft, you can paste your freshly generated *accessToken* in `test/Microsoft/MicrosoftTest.php:24` then run `.\vendor\bin\phpunit test/Microsoft`.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1923d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32879976?v=4)[Noriel](/maintainers/noriel0010)[@noriel0010](https://github.com/noriel0010)

---

Tags

facebookgoogleSSOmicrosoftapplelinkedinapple sign inThird Partyapple idApple log inApple authenticationfacebook-authenticationGoogle sign inThird Party SSOThird Party authenticationFacebook log inFacebook sign inFacebook IDGoogle log inGoogle IDGoogle authenticationMicrosoft log inMicrosoft sign inMicrosoft IDMicrosoft authenticationLinkedin log inLinkedin sign inLinkedin IDLinkedin authentication

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/noriel0010-third-party-sso/health.svg)

```
[![Health](https://phpackages.com/badges/noriel0010-third-party-sso/health.svg)](https://phpackages.com/packages/noriel0010-third-party-sso)
```

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k22.3M81](/packages/hwi-oauth-bundle)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[azimolabs/apple-sign-in-php-sdk

Library to verify and validate Apple IdentityToken and authenticate a user with Apple ID.

92496.5k](/packages/azimolabs-apple-sign-in-php-sdk)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6544.0M13](/packages/aporat-store-receipt-validator)[concrete5/core

Concrete core subtree split

20166.1k52](/packages/concrete5-core)

PHPackages © 2026

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