PHPackages                             waglpz/google-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. waglpz/google-sso

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

waglpz/google-sso
=================

Single sign on with Google. Minimal implementation.

v2.1.1(7mo ago)13.3kMITPHPPHP ^8.2CI passing

Since Apr 18Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/waglpz/google-sso)[ Packagist](https://packagist.org/packages/waglpz/google-sso)[ RSS](/packages/waglpz-google-sso/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (16)Versions (5)Used By (0)

Google SSO Client Library for PHP
---------------------------------

[](#google-sso-client-library-for-php)

The Google SSO Client Library enables you to work with single sign on via Google API.

### Requirements

[](#requirements)

PHP 8.2 or higher

### Installation

[](#installation)

composer require waglpz/google-sso:"^1.0"

Authentication with OAuth
-------------------------

[](#authentication-with-oauth)

1. Follow the instructions to [Create Web Application Credentials](https://github.com/googleapis/google-api-php-client/blob/master/docs/oauth-web.md)
2. Download the JSON credentials in some hidden directory and include this one path in config.
3. Set the path to these credentials using config `authConfig`.
4. Set the scopes required for the API you are going to call using config key `scopes`
5. Set your application's redirect URI in config
6. Set expected prompt when redirect to google. These can `none`, `consent` or `select_account`.
7. In the script handling the redirect URI, exchange the authorization code for an access token:

###### Example

[](#example)

```
  $config = include __DIR__ . '/../config/sso.php';
  $googleSSO = new \GoogleSSO\GoogleSSO($config);
  $authorizationCodeUrl = $googleSSO->createAuthUrl();
  // Go to the $authorizationCodeUrl and select account you will authenticate against.
  // these will redirect you to defined/known redirect URI and a PHP script will use the code which sends back from Google.
  $accountData = $googleSSO->fetchAccountDataUsingAuthorizationCode($_GET['code']);
  // $accountData contains necessary information if one was founded by google
```

Code Quality and Testing
------------------------

[](#code-quality-and-testing)

To check for coding style violations, run

```
composer waglpz:code:style:check

```

To automatically fix (fixable) coding style violations, run

```
composer waglpz:code:style:fix

```

To check for static type violations, run

```
waglpz:code:analyse

```

To check for regressions, run

```
composer waglpz:test:norma

```

To check all violations at once, run

```
composer waglpz:check:normal

```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance63

Regular maintenance activity

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~301 days

Total

4

Last Release

223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d2bf7e4ad2cd1a9994072f5e0d794770b5dcfc27e794e47c2e38a07352485ea?d=identicon)[waglpz](/maintainers/waglpz)

---

Top Contributors

[![hilscherpeter](https://avatars.githubusercontent.com/u/63235325?v=4)](https://github.com/hilscherpeter "hilscherpeter (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/waglpz-google-sso/health.svg)

```
[![Health](https://phpackages.com/badges/waglpz-google-sso/health.svg)](https://phpackages.com/packages/waglpz-google-sso)
```

###  Alternatives

[alchemyguy/youtube-laravel-api

It is a wrapper over Youtube Api v3 which simplifies functionalities the laravel way.

637.3k](/packages/alchemyguy-youtube-laravel-api)[jamesedmonston/graphql-authentication

GraphQL authentication for your headless Craft CMS applications.

2917.0k](/packages/jamesedmonston-graphql-authentication)[phhung1901/google_one_tap

Login with google one tap/google popup login

2716.1k](/packages/phhung1901-google-one-tap)[happyr/google-site-authenticator-bundle

Authenticate your website (not your users) with Google API. Can be used instead as Domain-Wide Delegation of Authority

1315.2k](/packages/happyr-google-site-authenticator-bundle)

PHPackages © 2026

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