PHPackages                             mailium/oauth-client-laravel - 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. mailium/oauth-client-laravel

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

mailium/oauth-client-laravel
============================

Mailium Oauth Client Library Laravel Integration Package

1.0.33(7y ago)28091Apache Version 2.0PHPPHP &gt;=5.5.9

Since Sep 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mailium/oauth-client-laravel)[ Packagist](https://packagist.org/packages/mailium/oauth-client-laravel)[ RSS](/packages/mailium-oauth-client-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (9)Used By (0)

Mailium Oauth Client for Laravel Framework
==========================================

[](#mailium-oauth-client-for-laravel-framework)

[![Latest Stable Version](https://camo.githubusercontent.com/87e764ba764df1ffdcd3d286d515e69627c6d476062ec021316bace7e5324a82/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/mailium/oauth-client-laravel) [![Monthly Downloads](https://camo.githubusercontent.com/b93336f3d136fb4f2abeeddead2b309b98ed6e8d8f78ffcedb7f355e81134c7e/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d6c61726176656c2f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/mailium/oauth-client-laravel) [![License](https://camo.githubusercontent.com/54d3192af12f65c32a7b9884a4ea6284600e9d0a60a80a458847d548ef106a6c/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d6c61726176656c2f6c6963656e73652e737667)](https://packagist.org/packages/mailium/oauth-client-laravel) [![Build Status](https://camo.githubusercontent.com/564371523bf5007f17e07fe1b99a06bb1edb968c8fd450a39824a4d2ff749e82/68747470733a2f2f7472617669732d63692e6f72672f6d61696c69756d2f6f617574682d636c69656e742d6c61726176656c2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/564371523bf5007f17e07fe1b99a06bb1edb968c8fd450a39824a4d2ff749e82/68747470733a2f2f7472617669732d63692e6f72672f6d61696c69756d2f6f617574682d636c69656e742d6c61726176656c2e7376673f6272616e63683d6d6173746572)

Installation &amp; Configuration
--------------------------------

[](#installation--configuration)

### Service Provider

[](#service-provider)

Add Mailium Service Provider to providers array in config/app.php

```
MailiumOauthClient\MailiumOauthClientLaravel\MailiumOauthClientServiceProvider::class,

```

### Facade

[](#facade)

Add Mailium Facade to aliases array in config/app.php

```
'MailiumOauthClient' => MailiumOauthClient\MailiumOauthClientLaravel\MailiumOauthClientFacade::class,

```

### Middleware

[](#middleware)

Add Mailium Middleware to the middleware group array in app/Http/Kernel.php

```
\MailiumOauthClient\MailiumOauthClientLaravel\MailiumOauthClientMiddleware::class,

```

Example:

```
    protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \MailiumOauthClient\MailiumOauthClientLaravel\MailiumOauthClientMiddleware::class,
        ],
```

Publishing Migrations and Configuration
---------------------------------------

[](#publishing-migrations-and-configuration)

```
php artisan vendor:publish

```

Running Migrations
------------------

[](#running-migrations)

```
php artisan migrate

```

Configuring the Oauth Client
----------------------------

[](#configuring-the-oauth-client)

Configure your client\_id, client\_secret, required scopes and app type on config/mailium-oauth.php file.

Using the client on controllers
-------------------------------

[](#using-the-client-on-controllers)

Oauth client middleware adds four attributes to the incoming requests

- mailium\_app\_accid (account identifier)
- mailium\_app\_user (mailium app user object)
- mailium\_app\_just\_installed (boolean variable defines if the app is just installed and the request is first one )
- mailium\_api\_client (API wrapper)

### Getting accid (Account Identifier)

[](#getting-accid-account-identifier)

```
      $this->accId = $request->attributes->get('mailium_app_accid');

```

### Getting user (mailium app user)

[](#getting-user-mailium-app-user)

```
      $this->mailiumAppUser = $request->attributes->get('mailium_app_user');

```

### Indicator of first request to the app

[](#indicator-of-first-request-to-the-app)

```
      $this->justInstalled = $request->attributes->get('mailium_app_just_installed');

```

### Getting API client

[](#getting-api-client)

```
      $this->apiClient = $request->attributes->get('mailium_api_client');

```

### Running API commands on controller

[](#running-api-commands-on-controller)

```
      $this->apiClient->run('List.GetList',array());

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~115 days

Recently: every ~200 days

Total

8

Last Release

2758d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20596368?v=4)[mailium](/maintainers/mailium)[@mailium](https://github.com/mailium)

---

Top Contributors

[![leventogut](https://avatars.githubusercontent.com/u/895636?v=4)](https://github.com/leventogut "leventogut (7 commits)")[![jonasdt](https://avatars.githubusercontent.com/u/1201842?v=4)](https://github.com/jonasdt "jonasdt (6 commits)")[![merthurturk](https://avatars.githubusercontent.com/u/1395005?v=4)](https://github.com/merthurturk "merthurturk (2 commits)")

---

Tags

apilaraveloauthoauth2mailium

### Embed Badge

![Health badge](/badges/mailium-oauth-client-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/mailium-oauth-client-laravel/health.svg)](https://phpackages.com/packages/mailium-oauth-client-laravel)
```

###  Alternatives

[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)

PHPackages © 2026

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