PHPackages                             xcoorp/swissid-socialite - 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. xcoorp/swissid-socialite

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

xcoorp/swissid-socialite
========================

Swiss ID OAuth2 Provider for Laravel Socialite

v1.0.1(1y ago)03.7k↓50%MITPHPPHP ^8.3CI passing

Since Nov 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/xcoorp/swissid-socialite)[ Packagist](https://packagist.org/packages/xcoorp/swissid-socialite)[ RSS](/packages/xcoorp-swissid-socialite/feed)WikiDiscussions main Synced 1mo ago

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

 [ ![XCoorp Logo](https://camo.githubusercontent.com/9e5470d5613df8f5e88fedaf623f727dbfdc13cde3204bc683cd9b18f2e6c9c0/68747470733a2f2f7777772e78636f6f72702e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032312f30352f6c6f676f5f78636f6f72705f3334302d3330307835362e706e67) ](https://www.xcoorp.com)

 Swiss ID Socialite Plugin for Laravel

```
composer require xcoorp/swissid-socialite
```

Installation &amp; Basic Usage
------------------------------

[](#installation--basic-usage)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

### Add configuration to `config/services.php`

[](#add-configuration-to-configservicesphp)

```
'swissid' => [
    'client_id' => env('SWISSID_CLIENT_ID'),
    'client_secret' => env('SWISSID_CLIENT_SECRET'),
    'redirect' => env('SWISSID_REDIRECT_URL'),
    'base_url' => env('SWISSID_BASE_URL'),
    'issuer' => env('SWISSID_ISSUER'),
    'requested_authentication' => 'qoa2', // qoa1 = single factor authentication (username, password), qoa2 = two factor authentication required (username, password, sms code)
    'claims' => [                         // OPTIONAL: Specify additional claims to be requested
        'urn:swissid:qor' => [
            'value' => 'qor2',
        ],
    ],
],
```

### Add provider event listener

[](#add-provider-event-listener)

#### Laravel 11+

[](#laravel-11)

In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method.

- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('swissid', \XCoorp\SwissIDSocialite\Provider::class);
});
```

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        \XCoorp\SwissIDSocialite\SwissIDExtendSocialite::class.'@handle',
    ],
];
```

### Usage

[](#usage)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('swissid')->redirect();
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance41

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~63 days

Total

2

Last Release

489d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6703727b3960b7f58325c28bc4b209acd71c4499d383759fc8397db50691a17?d=identicon)[toitzi](/maintainers/toitzi)

---

Top Contributors

[![toitzi](https://avatars.githubusercontent.com/u/42447585?v=4)](https://github.com/toitzi "toitzi (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelsocialiteswissidlaravelprovideroauthsocialiteswissidswiss-id

### Embed Badge

![Health badge](/badges/xcoorp-swissid-socialite/health.svg)

```
[![Health](https://phpackages.com/badges/xcoorp-swissid-socialite/health.svg)](https://phpackages.com/packages/xcoorp-swissid-socialite)
```

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[socialiteproviders/kakao

Kakao OAuth2 Provider for Laravel Socialite

10484.7k4](/packages/socialiteproviders-kakao)

PHPackages © 2026

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