PHPackages                             icehero/silex-opauth - 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. [Framework](/categories/framework)
4. /
5. icehero/silex-opauth

AbandonedArchivedLibrary[Framework](/categories/framework)

icehero/silex-opauth
====================

Opauth silex framework service provider.

328.7k141PHP

Since Mar 4Pushed 8y agoCompare

[ Source](https://github.com/icehero/silex-opauth)[ Packagist](https://packagist.org/packages/icehero/silex-opauth)[ RSS](/packages/icehero-silex-opauth/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (1)

Usage
=====

[](#usage)

Simple, event driven silex extension
------------------------------------

[](#simple-event-driven-silex-extension)

```
    // Configure opauth
    $app['opauth'] = array(
      'login' => '/auth',
      'callback' => '/auth/callback',
      'config' => array(
        'security_salt' => '...your salt...',
        'Strategy' => array(
            'Facebook' => array(
               'app_id' => '...',
               'app_secret' => '...'
             ),
        )
      )
    );

    // Enable extension
    $app->register(new OpauthExtension());

    // Listen for events
    $app->on(OpauthExtension::EVENT_ERROR, function($e) {
        $this->log->error('Auth error: ' . $e['message'], ['response' => $e->getSubject()]);
        $e->setArgument('result', $this->redirect('/'));
    });

    $app->on(OpauthExtension::EVENT_SUCCESS, function($e) {
        $response = $e->getSubject();

        /*
           find/create a user, oauth response is in $response and it's already validated!
           store the user in the session
        */

        $e->setArgument('result', $this->redirect('/'));
    });
```

Advanced, symfony security listener+provider
--------------------------------------------

[](#advanced-symfony-security-listenerprovider)

Note, that you can use it in symfony2 projects too!

To login using opauth use /login/PROVIDER, or use `opauth_default_login` route with `provider` parameter.

```
    $app->register(new OpauthSilexProvider());
    $app->register(new SecurityServiceProvider(), array(
        'security.firewalls' => array(
            'default' => array(
                'pattern' => '^/.*',
                'opauth' => array(
                    // 'check_path' => '/login/opauth', //default
                    'opauth' => [
                        // 'path' => '/login', //default
                        'security_salt' => '...your salt...',
                        'Strategy' => [
                            // your opauth strategies go here
                        ]
                    ]
                ),
                'anonymous' => true,
            ),
        )
    );
```

By default, users will be looked up by username "provider:uid".

You should extend your user provider to handle OPauth results correctly by implementing `OpauthUserProviderInterface`.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.4% 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/65630496?v=4)[icehero](/maintainers/icehero)[@IceHero](https://github.com/IceHero)

---

Top Contributors

[![FlorinPopaCodes](https://avatars.githubusercontent.com/u/456185?v=4)](https://github.com/FlorinPopaCodes "FlorinPopaCodes (11 commits)")[![panrafal](https://avatars.githubusercontent.com/u/1268900?v=4)](https://github.com/panrafal "panrafal (4 commits)")[![IceHero](https://avatars.githubusercontent.com/u/65630496?v=4)](https://github.com/IceHero "IceHero (3 commits)")[![defragmentator](https://avatars.githubusercontent.com/u/11047379?v=4)](https://github.com/defragmentator "defragmentator (2 commits)")[![lelotnk](https://avatars.githubusercontent.com/u/912979?v=4)](https://github.com/lelotnk "lelotnk (1 commits)")

### Embed Badge

![Health badge](/badges/icehero-silex-opauth/health.svg)

```
[![Health](https://phpackages.com/badges/icehero-silex-opauth/health.svg)](https://phpackages.com/packages/icehero-silex-opauth)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)

PHPackages © 2026

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