PHPackages                             vatsim/sso-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. vatsim/sso-laravel

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

vatsim/sso-laravel
==================

VATSIM OAuth for Laravel

3.1(6y ago)13.3k↓100%3MITPHPPHP &gt;=5.4.0

Since Jul 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bonroyage/vatsim-sso-laravel)[ Packagist](https://packagist.org/packages/vatsim/sso-laravel)[ RSS](/packages/vatsim-sso-laravel/feed)WikiDiscussions master Synced 1mo ago

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

This package is no longer maintained. Consider using the [Laravel Socialite provider](https://socialiteproviders.com/Vatsim/).
==============================================================================================================================

[](#this-package-is-no-longer-maintained-consider-using-the-laravel-socialite-provider)

---

VatsimSSO for Laravel
=====================

[](#vatsimsso-for-laravel)

**Version:** 3.0

The VatsimSSO package integrates with the VATSIM.net Single Sign On, which lets your users log themselves in using their VATSIM ID. This is especially useful for official vACCs and ARTCCs.

This package supports both Laravel 5 and 6.

Installation
------------

[](#installation)

Use [Composer](http://getcomposer.org) to install the VatsimSSO and dependencies.

```
$ composer require vatsim/sso-laravel 3.*
```

### Set up

[](#set-up)

Add the provider and facade to your `app.php` config file (`config/app.php`).

- **Provider:** `Vatsim\OAuthLaravel\OAuthServiceProvider`
- **Facade:** `Vatsim\OAuthLaravel\SSOFacade`

### Configuration file

[](#configuration-file)

Use artisan to publish the configuration file. Change the settings accordingly.

```
$ artisan vendor:publish --provider="Vatsim\OAuthLaravel\OAuthServiceProvider"
```

It is **strongly** recommended you use Laravel's built-in support for environment files to protect sensitive data. Additional details can be found in the comments of the config file.

Usage
-----

[](#usage)

### Logging In

[](#logging-in)

The first step would be to send a request to VATSIM to let the user login. The easiest approach would be using the `login` function. The function takes three parameters.

#### Parameters

[](#parameters)

ParameterTypeDescription`$returnUrl`stringThe URL to which the user should be redirected after the login is successful`$success`ClosureCallback function containing the actions needed to be done when you are able to let the user authenticate (ie. when your key/secret are correct). The function will return three variables: `$key`, `$secret` and `$url`.*`$error`*Closure*Default: null* – Callback function for error handling. The function will provide one argument: an instance of `VATSIM\OAuth\SSOException`. If no callback is provided, the `SSOException` will be thrown.#### Success

[](#success)

The success parameter provides three arguments: `$key`, `$secret` and `$url`. The `key` and `secret` should be stored in a session for the validation process. The `url` will be used to redirect the user to the VATSIM SSO site.

#### Error

[](#error)

Optional parameter. If this parameter is ignored and an error occurs, a `SSOException` will be thrown. If you pass a function then one parameter will be returned `$error`, which is the instance of `SSOException`.

#### Example

[](#example)

```
$returnUrl = '...'; // load URL from config

return VatsimSSO::login(
    $returnUrl,
    function($key, $secret, $url) {
        Session::put('vatsimauth', compact('key', 'secret'));
        return Redirect::to($url);
    },
    function($e) {
        throw $e; // Do something with the exception
    }
);
```

If you prefer not to use the `->login()` function, you may use `->requestToken($returnUrl)`. This will return an object containing the `key` and `secret` or throw `VATSIM\OAuth\SSOException` if an error occurs. Then use `->redirectUrl()` to get the URL for the redirect.

### Validating login

[](#validating-login)

After the login has been successful, we need to get the user data from VATSIM. Also for this we wrote a function to make it easier for you.

#### Parameters

[](#parameters-1)

ParameterTypeDescription`$key`stringThe `key` stored in the session at login`$secret`stringThe `secret` stored in the session at login`$verifier`stringThe `oauth_verifier` passed in the query string`$success`ClosureCallback function containing the actions needed to be done when the login has been successful.*`$error`*Closure*Default: null* – Callback function for error handling (could be because of wrong key/secret/verifier). The function will provide one argument: an instance of `VATSIM\OAuth\SSOException`. If no callback is provided, the `SSOException` will be thrown.#### Success

[](#success-1)

The success parameter returns two variables: `$user` and `$request`. The `user` variable will be an object containing all user data available to your organisation. The `request` variable will give you information about the request.

#### Error

[](#error-1)

Optional parameter. If this parameter is ignored and an error occurs, a `SSOException` will be thrown. If you pass a function then one parameter will be returned `$error`, which is the instance of `SSOException`.

#### Example

[](#example-1)

```
$session = Session::get('vatsimauth');

return VatsimSSO::validate(
    $session['key'],
    $session['secret'],
    Input::get('oauth_verifier'),
    function($user, $request) {
        // At this point we can remove the session data.
        Session::forget('vatsimauth');

        Auth::loginUsingId($user->id);
        return Redirect::home();
    },
    function($error) {
        throw $e; // Do something with the exception
    }
);
```

If you prefer not to use the `->validate()` function, you may use `->checkLogin($key, $secret, $verifier)`. This will return an object containing the `user` and `request` objects or throw `VATSIM\OAuth\SSOException` if an error occurs.

License
-------

[](#license)

MIT

**Free Software, Hell Yeah!**

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Every ~795 days

Total

2

Last Release

2417d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelSSOoauthvatsim

### Embed Badge

![Health badge](/badges/vatsim-sso-laravel/health.svg)

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

###  Alternatives

[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

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

PHPackages © 2026

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