PHPackages                             opauth/opauth - 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. opauth/opauth

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

opauth/opauth
=============

Multi-provider authentication framework for PHP

0.4.5(8y ago)1.6k783.4k↓18.2%238[29 issues](https://github.com/opauth/opauth/issues)[4 PRs](https://github.com/opauth/opauth/pulls)20MITPHPPHP &gt;=5.2.0

Since May 22Pushed 6y ago107 watchersCompare

[ Source](https://github.com/opauth/opauth)[ Packagist](https://packagist.org/packages/opauth/opauth)[ Docs](http://opauth.org)[ RSS](/packages/opauth-opauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (13)Used By (20)

[![Opauth](https://github.com/opauth/opauth.github.io/raw/master/images/opauth-logo-300px-transparent.png)](https://github.com/opauth/opauth.github.io/raw/master/images/opauth-logo-300px-transparent.png)
===========================================================================================================================================================================================================

[](#)

Opauth is a multi-provider authentication framework for PHP, inspired by [OmniAuth for Ruby](https://github.com/intridea/omniauth).

Opauth enables PHP applications to do *user authentication* with ease.

Try out Opauth for yourself at

[![Build Status](https://camo.githubusercontent.com/c51eb923ae3e013c18e79c1359aa3d28f3e21f709f23f4297fe756f880c9927f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6f70617574682f6f70617574682e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/opauth/opauth)

What is Opauth?
---------------

[](#what-is-opauth)

Opauth provides a standardized method for PHP applications to interface with authentication providers.

Opauth as a framework provides a set of API that allows developers to [create strategies](https://github.com/opauth/opauth/wiki/Strategy-Contribution-Guide) that work in a predictable manner across PHP frameworks and applications.

Opauth works well with other PHP applications &amp; frameworks. It is currently supported on:

- [vanilla (plain) PHP applications](https://github.com/opauth/opauth/tree/master/example)
- [CakePHP](https://github.com/uzyn/cakephp-opauth) (maintained by [uzyn](https://github.com/uzyn))
- [CodeIgniter](https://github.com/destinomultimedia/ci_opauth) (maintained by [destinomultimedia](https://github.com/destinomultimedia))
- [CodeIgniter](https://github.com/mcatm/Opauth-Plugin-for-Codeigniter) (maintained by [mcatm](https://github.com/mcatm))
- [FuelPHP](https://github.com/andreoav/fuel-opauth) (maintained by [andreoav](https://github.com/andreoav/))
- [Laravel](https://github.com/FakeHeal/opauth-laravel) (maintained by [FakeHeal](https://github.com/FakeHeal/))
- [PrestaShop](https://github.com/Onasusweb/PrestaShop-Opauth) (maintained by [Onasusweb](https://github.com/Onasusweb))
- [Silex](https://github.com/icehero/silex-opauth) (maintained by [icehero](https://github.com/icehero/))
- [SilverStripe](https://github.com/BetterBrief/silverstripe-opauth) (maintained by [Better Brief](https://github.com/BetterBrief))
- [Zend Framework 2](https://github.com/lorenzoferrarajr/LfjOpauth) (maintained by [lorenzoferrarajr](https://github.com/lorenzoferrarajr))
- and more to come.

If your PHP framework of choice is not yet listed, you can still use Opauth like you would a normal PHP component (class).

Quick start
-----------

[](#quick-start)

Guide on how to run the bundled example.

1. Set `DocumentRoot` of your web server to `example/`. (Opauth can be instantiated in your own PHP app, but we will leave that out of this quick start guide)
2. Configure Opauth.

    First, make a copy of opauth config's file by copying or renaming `opauth.conf.php.default` to `opauth.conf.php`.

    Open up `opauth.conf.php` and make the necessary changes.
3. Install some [Opauth strategies](https://github.com/opauth/opauth/wiki/List-of-strategies). Place the strategy files in `lib/Opauth/Strategy/`.

    For this example, we recommend that you start with [Opauth-Facebook](https://github.com/opauth/facebook):

    i. [Download the strategy files](https://github.com/opauth/facebook/zipball/master) and place them at `lib/Opauth/Strategy/Facebook/`.

    ii. Follow the steps at [Opauth-Facebook's README](https://github.com/opauth/facebook/blob/master/README.md) to set up your Faceobok app.

    iii. Add the following at `opauth.conf.php` under `Strategy` as such:

```
