PHPackages                             v-imarcom/keycloak-ingress - 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. v-imarcom/keycloak-ingress

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

v-imarcom/keycloak-ingress
==========================

Keycloak OAuth2 Provider for Laravel Socialite

5.1.2(4y ago)075MITPHPPHP ^7.2 || ^8.0

Since Apr 30Pushed 4y agoCompare

[ Source](https://github.com/vicklamarreimarcom/Keycloak)[ Packagist](https://packagist.org/packages/v-imarcom/keycloak-ingress)[ RSS](/packages/v-imarcom-keycloak-ingress/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (10)Used By (0)

Keycloak
========

[](#keycloak)

```
composer require socialiteproviders/keycloak
```

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)

```
'keycloak' => [
  'client_id' => env('KEYCLOAK_CLIENT_ID'),
  'client_secret' => env('KEYCLOAK_CLIENT_SECRET'),
  'redirect' => env('KEYCLOAK_REDIRECT_URI'),
  'base_url' => env('KEYCLOAK_BASE_URL'),   // Specify your keycloak server URL here
  'realms' => env('KEYCLOAK_REALM')         // Specify your keycloak realm
],
```

### Add provider event listener

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

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 => [
        // ... other providers
        \SocialiteProviders\Keycloak\KeycloakExtendSocialite::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('keycloak')->redirect();
```

To logout of your app and Keycloak:

```
public function logout() {
    Auth::logout(); // Logout of your app
    $redirectUri = Config::get('app.url'); // The URL the user is redirected to
    return redirect(Socialite::driver('keycloak')->getLogoutUrl($redirectUri)); // Redirect to Keycloak
}
```

#### Keycloak &lt;= 3.2

[](#keycloak--32)

Keycloak below v3.2 requires no scopes to be set. Later versions require the `openid` scope for all requests.

```
return Socialite::driver('keycloak')->scopes([])->redirect();
```

See [the upgrade guide](https://www.keycloak.org/docs/12.0/upgrading/#migrating-to-3-2-0).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~75 days

Recently: every ~96 days

Total

9

Last Release

1598d ago

Major Versions

v3.0.2 → 4.0.02020-10-25

4.1.0 → 5.0.02021-06-02

PHP version history (3 changes)v3.0.0PHP ^5.6 || ^7.0

v3.0.2PHP ^7.2

4.1.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/641c9b7f540f92a657b0dc386984cd9c3905cb455acaac483f7d18a5679347cc?d=identicon)[vicklamarreimarcom](/maintainers/vicklamarreimarcom)

---

Top Contributors

[![vicklamarreimarcom](https://avatars.githubusercontent.com/u/96548435?v=4)](https://github.com/vicklamarreimarcom "vicklamarreimarcom (11 commits)")[![andrzejkupczyk](https://avatars.githubusercontent.com/u/11018286?v=4)](https://github.com/andrzejkupczyk "andrzejkupczyk (1 commits)")

---

Tags

laravelprovideroauthsocialitekeycloak

### Embed Badge

![Health badge](/badges/v-imarcom-keycloak-ingress/health.svg)

```
[![Health](https://phpackages.com/badges/v-imarcom-keycloak-ingress/health.svg)](https://phpackages.com/packages/v-imarcom-keycloak-ingress)
```

###  Alternatives

[socialiteproviders/keycloak

Keycloak OAuth2 Provider for Laravel Socialite

211.8M11](/packages/socialiteproviders-keycloak)[socialiteproviders/kakao

Kakao OAuth2 Provider for Laravel Socialite

10484.7k4](/packages/socialiteproviders-kakao)

PHPackages © 2026

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