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

AbandonedArchivedLaravel-package[Authentication &amp; Authorization](/categories/authentication)

stormpath/laravel
=================

Build simple, secure web applications with Stormpath and Laravel!

0.5.1(9y ago)291.2k6[9 issues](https://github.com/stormpath/stormpath-laravel/issues)[2 PRs](https://github.com/stormpath/stormpath-laravel/pulls)Apache-2.0PHPPHP &gt;=5.5

Since Dec 4Pushed 9y ago13 watchersCompare

[ Source](https://github.com/stormpath/stormpath-laravel)[ Packagist](https://packagist.org/packages/stormpath/laravel)[ RSS](/packages/stormpath-laravel/feed)WikiDiscussions develop Synced today

READMEChangelog (10)Dependencies (9)Versions (18)Used By (0)

[![Build Status](https://camo.githubusercontent.com/8d898caa9d66c1969d274248bb050523ab41965f801416840e9670b223291c97/68747470733a2f2f6170692e7472617669732d63692e6f72672f73746f726d706174682f73746f726d706174682d6c61726176656c2e7376673f6272616e63683d6d61737465722c646576656c6f70)](https://travis-ci.org/stormpath/stormpath-laravel)[![Codecov](https://camo.githubusercontent.com/5a25bf08e796a6d93cc5c7f3febb72c277a83921bfdc6595951212d009fabe6e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f73746f726d706174682f73746f726d706174682d6c61726176656c2e737667)](https://codecov.io/github/stormpath/stormpath-laravel)[![Latest Stable Version](https://camo.githubusercontent.com/dd949146b57c326f1e10e66071190cf9f630da11521c057ea92bf01b2dad5b61/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/stormpath/laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/7a24fef3e8e84e64ed969cfd4913cc7a52c388d3ba8354582739c2b6eda65a4d/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c61726176656c2f762f756e737461626c652e737667)](https://packagist.org/packages/stormpath/laravel)[![License](https://camo.githubusercontent.com/3ae9176a09c5bb6cbb61405d3899e6f2b6fc06709b2136e3c961466069eb3bb1/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c61726176656c2f6c6963656e73652e737667)](https://packagist.org/packages/stormpath/laravel)

\#Stormpath is Joining Okta We are incredibly excited to announce that [Stormpath is joining forces with Okta](https://stormpath.com/blog/stormpaths-new-path?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement). Please visit [the Migration FAQs](https://stormpath.com/oktaplusstormpath?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement) for a detailed look at what this means for Stormpath users.

We're available to answer all questions at .

Getting Started
---------------

[](#getting-started)

Follow these steps to add Stormpath user authentication to your Laravel app.

1. **Download Your Key File**

[Download your key file](https://support.stormpath.com/hc/en-us/articles/221077627-Where-do-I-find-my-API-key-) from the Stormpath Console.

2. **Store Your Key As Environment Variables**

Open your key file and grab the **API Key ID** and **API Key Secret**, then add this to your `.env` file in the root of your project:

```
STORMPATH_CLIENT_APIKEY_ID=
STORMPATH_CLIENT_APIKEY_SECRET=
```

3. **Get Your Stormpath App HREF**

Login to the [Stormpath Console](https://api.stormpath.com/) and grab the *HREF* (called **REST URL** in the UI) of your *Application*. It should look something like this:

`https://api.stormpath.com/v1/applications/q42unYAj6PDLxth9xKXdL`

4. **Store Your Stormpath App HREF In the `.env` file**

```
STORMPATH_APPLICATION_HREF=
```

5. **Install The Package**

Open your composer.json file and add the following to your require block:

```
"stormpath/laravel": "^0.4"
```

6. **Include It In Your App**

    Open you `config/app.php` file and add the following to your providers section

```
Stormpath\Laravel\Support\StormpathLaravelServiceProvider::class
```

7. **Configure It**

To modify the configuration of the package, you will need to publish the config file. Run the following in your terminal:

```
$ php artisan vendor:publish
```

8. **Protect Your Routes**

You can use `stormpath.auth` as a middleware to protect your routes:

```
Route::get('/page', ['middleware'=>'stormpath.auth']);
```

If the user tries to access this route without being logged in, they will be redirected to the login page.

If you want to make sure ONLY guests can use the route, You can use `stormpath.guest` as a middleware:

```
  Route::get('/page', ['middleware'=>'stormpath.guest']);
```

If the user tries to access this route while logged in, they will be redirected to the home page.

9. **Login**

To access a protected route, the user must first login.

You can login by visiting the `/login` URL and submitting the login form.

10. **Register**

To be able to login, your users first need an account.

Users can register by visiting the `/register` URL and submitting the registration form.

11. **That's It!**

You just added user authentication to your app with Stormpath. See the [documentation](https://docs.stormpath.com/php/laravel/latest/) for further information on how Stormpath can be used with your Laravel app.

Documentation
-------------

[](#documentation)

For basic documentation of this library, see the [documentation](https://docs.stormpath.com/php/laravel/latest/).

Support
-------

[](#support)

If you are having issues with this package, please feel free to submit an issue on this github repository. If it is an issue you are having that needs a little more private attention, please feel free to contact us at [support@stormpath.com](mailto:support@stormpath.com?subject=Stormpath+Laravel+Integration) or visit our [support center](https://support.stormpath.com).

Contributing
------------

[](#contributing)

We welcome anyone to make contributions to this project. Just fork the `develop` branch of this repository, make your changes, then issue a pull request on the `develop` branch.

Any pull request you make will need to have associated tests with them. If a test is not provided, the pull request will be closed automatically. Also, any pull requests made to a branch other than `develop` will be closed and a new submission will need to be made to the `develop` branch.

We regularly maintain this repository, and are quick to review pull requests and accept changes!

Copyright
---------

[](#copyright)

Copyright © 2013-2015 Stormpath, Inc. and contributors.

This project is open-source via the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.2% 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 ~29 days

Recently: every ~64 days

Total

14

Last Release

3478d ago

### Community

Maintainers

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

---

Top Contributors

[![kryten87](https://avatars.githubusercontent.com/u/2042984?v=4)](https://github.com/kryten87 "kryten87 (69 commits)")[![bretterer](https://avatars.githubusercontent.com/u/1906920?v=4)](https://github.com/bretterer "bretterer (11 commits)")[![rdegges](https://avatars.githubusercontent.com/u/90247?v=4)](https://github.com/rdegges "rdegges (7 commits)")[![nurettintopal](https://avatars.githubusercontent.com/u/1067132?v=4)](https://github.com/nurettintopal "nurettintopal (3 commits)")[![chaseconey](https://avatars.githubusercontent.com/u/1449463?v=4)](https://github.com/chaseconey "chaseconey (1 commits)")[![brentstormpath](https://avatars.githubusercontent.com/u/3010338?v=4)](https://github.com/brentstormpath "brentstormpath (1 commits)")[![xRahul](https://avatars.githubusercontent.com/u/1639945?v=4)](https://github.com/xRahul "xRahul (1 commits)")

---

Tags

laravelAuthenticationauthorizationUsersaccountsstormpath

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77018.2M124](/packages/laravel-mcp)[hasinhayder/tyro

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

6783.6k5](/packages/hasinhayder-tyro)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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