PHPackages                             ziffdavis/laravel-onelogin - 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. ziffdavis/laravel-onelogin

Abandoned → [ziffmedia/laravel-onelogin](/?search=ziffmedia%2Flaravel-onelogin)ArchivedLibrary

ziffdavis/laravel-onelogin
==========================

Simplified integration of OneLogin for Laravel applications.

v0.0.7(6y ago)524.8k[1 issues](https://github.com/ZiffDavis/laravel-onelogin/issues)[1 PRs](https://github.com/ZiffDavis/laravel-onelogin/pulls)MITPHP

Since Jan 31Pushed 5y ago23 watchersCompare

[ Source](https://github.com/ZiffDavis/laravel-onelogin)[ Packagist](https://packagist.org/packages/ziffdavis/laravel-onelogin)[ RSS](/packages/ziffdavis-laravel-onelogin/feed)WikiDiscussions master Synced 2mo ago

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

THIS PACKAGE HAS MOVED
======================

[](#this-package-has-moved)

This package has moved to

Furthermore, the new package has reached 1.0, production worthy status and should be used in place of any application where ziffdavis/laravel-onelogin was once used.

Laravel onelogin
================

[](#laravel-onelogin)

A Laravel package for allowing onelogin to provide authentication and users to your application. This library wraps onelogin's [onelogin/php-saml](https://github.com/onelogin/php-saml) library.

Features:

- simplified configuration process
- top level (configurable) `login` and `logout` routes
- support for autologin
- ability to map any User attributes via a login event
- loose SAML workflow for localhost/local environments, strict when in production

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

[](#installation)

```
composer require ziffdavis/laravel-onelogin

```

Next, publish the configuration file:

```
artisan vendor:publish --provider='ZiffDavis\Laravel\Onelogin\OneloginServiceProvider'

```

### Note for Laravel 5.7+

[](#note-for-laravel-57)

If your application uses Laravel 5.7 or greater, please make sure this package is updated to v0.0.7 or greater.

Configuration &amp; Setup
=========================

[](#configuration--setup)

Go into your onelogin administration screen, create an application with the "SAML Test Connector (IdP w/attr)" template. The onelogin tutorial is a great reference at

Once you have an app in onelogin minimally setup, utilize the App &gt; SSO tab to get the necessary values to put inside the configuration file. See [./config/onelogin.php](./config/onelogin.php)for details on which fields are necessary.

The User Setup
--------------

[](#the-user-setup)

(The following setup assumes your users will be populated by onelogin the first time they successfully try to log into your application.)

Out the box, this package is designed to work with the typical user schema provided with laravel with minimal changes. Typical changes to make look like this:

- remove the `2014_10_12_100000_create_password_resets_table.php` migration file
- remove the `$table->timestamp('email_verified_at')->nullable();` and `$table->string('password');` columns from the `2014_10_12_000000_create_users_table.php` migration

### (Optional) Laravel Nova...

[](#optional-laravel-nova)

Laravel Nova's default installation adds authentication routes to your application, it is wise to remove them inside your application's `NovaServiceProvider`:

```
    /**
     * Register the Nova routes.
     *
     * @return void
     */
    protected function routes()
    {
        Nova::routes()
                // ->withAuthenticationRoutes()
                // ->withPasswordResetRoutes()
                ->register();
    }
```

### User Attributes and New User Workflow

[](#user-attributes-and-new-user-workflow)

By default, the following actions happen on successful login (From the OneloginController):

```
    protected function resolveUser(array $userAttributes)
    {
        $userClass = config('auth.providers.users.model');

        $user = $userClass::firstOrNew(['email' => $credentials['User.email'][0]]);

        if (isset($credentials['User.FirstName'][0]) && isset($credentials['User.LastName'][0])) {
            $user->name = "{$credentials['User.FirstName'][0]} {$credentials['User.LastName'][0]}";
        }

        $user->save();

        return $user;
    }
```

To customize this experience, create an Event inside your applications `EventServiceProvider`'s boot() method:

```
    public function boot()
    {
          // assuming: use ZiffDavis\Laravel\Onelogin\Events\OneloginLoginEvent;

          Event::listen(OneloginLoginEvent::class, function (OneloginLoginEvent $event) {
              $user = User::firstOrNew(['email' => $event->userAttributes['User.email'][0]]);

              if (isset($event->userAttributes['User.FirstName'][0]) && isset($event->userAttributes['User.LastName'][0])) {
                  $user->name = "{$event->userAttributes['User.FirstName'][0]} {$event->userAttributes['User.LastName'][0]}";
              }

              // other custom logic here

              $user->save();

              return $user;
          });
    }
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~60 days

Recently: every ~89 days

Total

7

Last Release

2294d ago

### Community

Maintainers

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

---

Top Contributors

[![ralphschindler](https://avatars.githubusercontent.com/u/76674?v=4)](https://github.com/ralphschindler "ralphschindler (14 commits)")[![jimbojsb](https://avatars.githubusercontent.com/u/107836?v=4)](https://github.com/jimbojsb "jimbojsb (1 commits)")[![recycledbeans](https://avatars.githubusercontent.com/u/13002230?v=4)](https://github.com/recycledbeans "recycledbeans (1 commits)")

### Embed Badge

![Health badge](/badges/ziffdavis-laravel-onelogin/health.svg)

```
[![Health](https://phpackages.com/badges/ziffdavis-laravel-onelogin/health.svg)](https://phpackages.com/packages/ziffdavis-laravel-onelogin)
```

###  Alternatives

[aacotroneo/laravel-saml2

A Laravel package for Saml2 integration as a SP (service provider) for multiple IdPs, based on OneLogin toolkit which is much more lightweight than simplesamlphp.

5704.4M](/packages/aacotroneo-laravel-saml2)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[hslavich/oneloginsaml-bundle

OneLogin SAML Bundle for Symfony

1482.5M1](/packages/hslavich-oneloginsaml-bundle)[pantheon-systems/wp-saml-auth

SAML authentication for WordPress, using SimpleSAMLphp.

93268.2k2](/packages/pantheon-systems-wp-saml-auth)[humanmade/wp-simple-saml

WordPress Simple SAML plugin

124284.7k2](/packages/humanmade-wp-simple-saml)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)

PHPackages © 2026

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