PHPackages                             eightynine/easyauth - 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. eightynine/easyauth

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

eightynine/easyauth
===================

Easy Auth SSO client plugin for Laravel and Filament apps.

1.0.0(5mo ago)05MITPHPPHP ^8.2

Since Jan 18Pushed 5mo agoCompare

[ Source](https://github.com/eighty9nine/easyauth)[ Packagist](https://packagist.org/packages/eightynine/easyauth)[ RSS](/packages/eightynine-easyauth/feed)WikiDiscussions main Synced today

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

EasyAuth Client Plugin
======================

[](#easyauth-client-plugin)

This guide is for a developer who has never wired SSO before. Follow the steps exactly.

Overview
--------

[](#overview)

Step 1: Create a client on the EasyAuth server
----------------------------------------------

[](#step-1-create-a-client-on-the-easyauth-server)

1. Log in to the EasyAuth admin panel.
2. Create a new OAuth client.
3. Copy the **Client ID** and **Client Secret**.
4. Add your app’s callback URL. Example:
    -

The callback URL is provided by this package (it’s always your `APP_URL` + the callback route). You can also print it by running `php artisan easyauth:install --publish`.

You need these values for your app’s .env in Step 4.

Step 2: Install the plugin in your app
--------------------------------------

[](#step-2-install-the-plugin-in-your-app)

Run this in your Laravel/Filament app:

```
composer require eightynine/easyauth
php artisan easyauth:install --publish
```

This adds the routes and publishes the config file.

Step 3: Ensure your app has sessions enabled
--------------------------------------------

[](#step-3-ensure-your-app-has-sessions-enabled)

The plugin uses sessions to store the OAuth state, tokens, and login status. Make sure:

- Your app uses the `web` middleware group.
- `SESSION_DRIVER` is set (database or file both work).

Step 4: Add the EasyAuth settings to your .env
----------------------------------------------

[](#step-4-add-the-easyauth-settings-to-your-env)

Use the values from Step 1:

```
EASYAUTH_SERVER_URL=https://auth.example.com
EASYAUTH_CLIENT_ID=your-client-id
EASYAUTH_CLIENT_SECRET=your-client-secret
```

Everything else can be configured in `config/easyauth.php` (published in Step 2).

Step 5: Send users to /auth/login
---------------------------------

[](#step-5-send-users-to-authlogin)

This route is provided by the plugin. Example:

- Add a “Sign in with EasyAuth” button that links to `/auth/login`.

When a user visits `/auth/login`, the plugin redirects them to:

- [https://auth.example.com/oauth/authorize?client\_id=...&amp;redirect\_uri=](https://auth.example.com/oauth/authorize?client_id=...&redirect_uri=)...

### Optional: use the built-in "Continue with Easy Auth" button

[](#optional-use-the-built-in-continue-with-easy-auth-button)

The plugin provides a Blade component you can drop into any Blade view:

```

```

This renders a branded button linking to `route('sso.login')`.

### Optional: override your app's login route

[](#optional-override-your-apps-login-route)

If you want `/login` (or other paths) to redirect into the EasyAuth flow, enable route overrides in `config/easyauth.php`:

```
'route_overrides' => [
	'enabled' => true,
	'login_paths' => ['/login'],
],
```

Step 6: What happens on callback (automatic)
--------------------------------------------

[](#step-6-what-happens-on-callback-automatic)

After login, EasyAuth redirects back to your callback URL with a code.

The plugin does this automatically:

1. Exchanges the code for tokens at `/oauth/token`.
2. Calls `/api/oauth/userinfo` to fetch the user profile.
3. Finds or creates a local user.
4. Logs the user into your app.
5. Redirects to the intended URL, falling back to `easyauth.post_login_redirect`.

You do not need to write this logic yourself.

Step 7: Logout
--------------

[](#step-7-logout)

POST `/auth/logout` to:

1. Log out locally.
2. Redirect the user to EasyAuth logout.

Routes provided by the plugin
-----------------------------

[](#routes-provided-by-the-plugin)

- /auth/login: start SSO
- /auth/callback: complete SSO (implemented by the plugin)
- /auth/refresh: refresh tokens
- /auth/logout: log out
- /auth/error: error screen

User mapping (when the user does not exist locally)
---------------------------------------------------

[](#user-mapping-when-the-user-does-not-exist-locally)

The plugin creates a local user using:

- `EASYAUTH_USER_IDENTIFIER` (default: email)
- `EASYAUTH_NAME_ATTRIBUTE` (default: name)
- `EASYAUTH_EMAIL_ATTRIBUTE` (default: email)

If your users are matched by another field, set those keys in .env.

Common issues and fixes
-----------------------

[](#common-issues-and-fixes)

- Redirect URI mismatch: the callback URL must exactly match what you registered.
- Invalid state: user opened the callback in a different browser or session expired.
- Userinfo failed: make sure the userinfo endpoint is reachable and scopes include `openid`.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance70

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

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

167d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97078bfe6be687082f9d2e8cf2ba73dfaff4efb25cd4c7572c1ebd9c7e9fcbae?d=identicon)[eighty9nine](/maintainers/eighty9nine)

---

Top Contributors

[![eighty9nine](https://avatars.githubusercontent.com/u/137639046?v=4)](https://github.com/eighty9nine "eighty9nine (3 commits)")

### Embed Badge

![Health badge](/badges/eightynine-easyauth/health.svg)

```
[![Health](https://phpackages.com/badges/eightynine-easyauth/health.svg)](https://phpackages.com/packages/eightynine-easyauth)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.0k14](/packages/tallstackui-tallstackui)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)

PHPackages © 2026

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