PHPackages                             xsolve-pl/xsolve-google-auth-bundle - 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. xsolve-pl/xsolve-google-auth-bundle

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

xsolve-pl/xsolve-google-auth-bundle
===================================

XSolve Google Auth Bundle to provide signing in to FOSUserBundle with Google Auth

1.0.0.x-dev(12y ago)4152MITPHP

Since Nov 4Pushed 11y ago71 watchersCompare

[ Source](https://github.com/xsolve-pl/xsolve-google-auth-bundle)[ Packagist](https://packagist.org/packages/xsolve-pl/xsolve-google-auth-bundle)[ RSS](/packages/xsolve-pl-xsolve-google-auth-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

About
=====

[](#about)

This bundle allows user to sign in via Google Auth 2.0 API to FOSUserBundle.

It includes:

- Google API integration
- Creating new user when it's necessary
- Signing in

Installation
============

[](#installation)

1. Install and configure FOSUserBundle

2. Add to composer.json

    "require": { "xsolve-pl/xsolve-google-auth-bundle": "1.0.\*" },
3. Install dependencies

    composer install
4. Run the bundle in app/AppKernel.php

    public function registerBundles() { return array( // ... new Xsolve\\GoogleAuthBundle\\XsolveGoogleAuthBundle(), ); }
5. Add to routing.yml

    xsolve\_google\_auth: resource: "@XsolveGoogleAuthBundle/Controller/" type: annotation prefix: /
6. Register your service in  an configure parameters.yml and add

    xsolve\_google\_auth: name: Xsolve test application client\_id: "4429041xxxx.apps.googleusercontent.com" client\_secret: "xrAbfJ7wmOBZbYU3TyDxxxxx" redirect\_uri: "" dev\_key: xsolvetestapplication

    ```
     success_authorization_redirect_url: _welcome
     failure_authorization_redirect_url: _welcome

     scopes:
        -  profile
        -  email

     autoregistration: false
     autoregistration_domains: []

    ```
7. Add access controls to security.yml

    access\_control: - { path: ^/oauth2callback, role: IS\_AUTHENTICATED\_ANONYMOUSLY } - { path: ^/googleauthlogin, role: IS\_AUTHENTICATED\_ANONYMOUSLY }

Usage
=====

[](#usage)

After configuring a bundle you can go to /oauth2callback page and the browser should redirect to google access page.

Configuration options
---------------------

[](#configuration-options)

Configuration can be adjusted in app/config/config.yml

```
xsolve_google_auth:
    name: Xsolve test application #name of application from google console
    client_id: "4429041xxxx.apps.googleusercontent.com" #client id of application from google console
    client_secret: "xrAbfJ7wmOBZbYU3TyDxxxxx" #client secret key of application from google console
    redirect_uri: "http://testapp.xsolve.pl/oauth2callback" #redirect uri of application from google console
    dev_key: xsolvetestapplication #your developmnent's application name from google console

    scopes: #data which application needs from google API
       -  profile
       -  email

    success_authorization_redirect_url: _welcome #url key inside Symfony where user should be redirected after successful sign in
    failure_authorization_redirect_url: _welcome #url key inside Symfony where user should be redirected after failure sign in

    autoregistration: false #true|false - if false than user will be registered into system automaticaly
    autoregistration_domains:  #array may be empty. If autoregistration is true you can allow to register users only from selected domains
       - xsolve.pl

```

Add link to Twig template
-------------------------

[](#add-link-to-twig-template)

Add this link to your Twig template to force login action with Google OAuth 2.0 :

```
Login with Google

```

or

```
Login with Google

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

4621d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/310cddbb4fcfdcff55a24d6e0845b9e30db0cb0826d3e7ec993a6c7df5a7fcdf?d=identicon)[piotrpasich](/maintainers/piotrpasich)

---

Top Contributors

[![piotrpasich](https://avatars.githubusercontent.com/u/1180426?v=4)](https://github.com/piotrpasich "piotrpasich (7 commits)")[![Kryniol](https://avatars.githubusercontent.com/u/1271328?v=4)](https://github.com/Kryniol "Kryniol (4 commits)")[![wowo](https://avatars.githubusercontent.com/u/100724?v=4)](https://github.com/wowo "wowo (3 commits)")

### Embed Badge

![Health badge](/badges/xsolve-pl-xsolve-google-auth-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/xsolve-pl-xsolve-google-auth-bundle/health.svg)](https://phpackages.com/packages/xsolve-pl-xsolve-google-auth-bundle)
```

PHPackages © 2026

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