{"id":13623689,"url":"https://github.com/opauth/opauth","last_synced_at":"2025-05-14T12:13:11.211Z","repository":{"id":2659176,"uuid":"3650148","full_name":"opauth/opauth","owner":"opauth","description":"Multi-provider authentication framework for PHP","archived":false,"fork":false,"pushed_at":"2020-05-15T17:34:12.000Z","size":547,"stargazers_count":1645,"open_issues_count":34,"forks_count":239,"subscribers_count":111,"default_branch":"master","last_synced_at":"2025-04-12T03:44:42.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://opauth.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-07T15:03:11.000Z","updated_at":"2025-03-23T01:18:16.000Z","dependencies_parsed_at":"2022-09-01T15:14:23.329Z","dependency_job_id":null,"html_url":"https://github.com/opauth/opauth","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opauth%2Fopauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opauth%2Fopauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opauth%2Fopauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opauth%2Fopauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opauth","download_url":"https://codeload.github.com/opauth/opauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514214,"owners_count":21116899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:34.573Z","updated_at":"2025-04-12T03:44:46.492Z","avatar_url":"https://github.com/opauth.png","language":"PHP","readme":"![Opauth](https://github.com/opauth/opauth.github.io/raw/master/images/opauth-logo-300px-transparent.png)\n=================================\nOpauth is a multi-provider authentication framework for PHP, inspired by [OmniAuth for Ruby](https://github.com/intridea/omniauth).\n\nOpauth enables PHP applications to do *user authentication* with ease.\n\nTry out Opauth for yourself at http://opauth.org\n\n[![Build Status](https://secure.travis-ci.org/opauth/opauth.png?branch=master)](http://travis-ci.org/opauth/opauth)\n\nWhat is Opauth?\n---------------\nOpauth provides a standardized method for PHP applications to interface with authentication providers.\n\nOpauth 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.\n\nOpauth works well with other PHP applications \u0026 frameworks. It is currently supported on:\n\n- [vanilla (plain) PHP applications](https://github.com/opauth/opauth/tree/master/example)\n- [CakePHP](https://github.com/uzyn/cakephp-opauth) (maintained by [uzyn](https://github.com/uzyn))\n- [CodeIgniter](https://github.com/destinomultimedia/ci_opauth) (maintained by [destinomultimedia](https://github.com/destinomultimedia))\n- [CodeIgniter](https://github.com/mcatm/Opauth-Plugin-for-Codeigniter) (maintained by [mcatm](https://github.com/mcatm))\n- [FuelPHP](https://github.com/andreoav/fuel-opauth) (maintained by [andreoav](https://github.com/andreoav/))\n- [Laravel](https://github.com/FakeHeal/opauth-laravel) (maintained by [FakeHeal](https://github.com/FakeHeal/))\n- [PrestaShop](https://github.com/Onasusweb/PrestaShop-Opauth) (maintained by [Onasusweb](https://github.com/Onasusweb))\n- [Silex](https://github.com/icehero/silex-opauth) (maintained by [icehero](https://github.com/icehero/))\n- [SilverStripe](https://github.com/BetterBrief/silverstripe-opauth) (maintained by [Better Brief](https://github.com/BetterBrief))\n- [Zend Framework 2](https://github.com/lorenzoferrarajr/LfjOpauth) (maintained by [lorenzoferrarajr](https://github.com/lorenzoferrarajr))\n- and more to come.\n\nIf your PHP framework of choice is not yet listed, you can still use Opauth like you would a normal PHP component (class).\n\nQuick start\n-----------\nGuide on how to run the bundled example.\n\n1. Set `DocumentRoot` of your web server to `example/`.\n   (Opauth can be instantiated in your own PHP app, but we will leave that out of this quick start guide)\n\n2. Configure Opauth.\n\n   First, make a copy of opauth config's file by copying or renaming\n   `opauth.conf.php.default` to `opauth.conf.php`.\n\n   Open up `opauth.conf.php` and make the necessary changes.\n\n3. Install some [Opauth strategies](https://github.com/opauth/opauth/wiki/List-of-strategies).\n   Place the strategy files in `lib/Opauth/Strategy/`.\n\n   For this example, we recommend that you start with [Opauth-Facebook](https://github.com/opauth/facebook):\n\n   i. [Download the strategy files](https://github.com/opauth/facebook/zipball/master) and place them at `lib/Opauth/Strategy/Facebook/`.\n\n   ii. Follow the steps at [Opauth-Facebook's README](https://github.com/opauth/facebook/blob/master/README.md) to set up your Faceobok app.\n\n   iii. Add the following at `opauth.conf.php` under `Strategy` as such:\n\n```php\n\u003c?php\n'Strategy' =\u003e array(\n    // Define strategies here.\n\n    'Facebook' =\u003e array(\n        'app_id' =\u003e 'YOUR APP ID',\n        'app_secret' =\u003e 'YOUR APP SECRET'\n    ),\n);\n```\n\nFinally, send user to `http://localhost/facebook` to authenticate.\n\n\nCheck out [the wiki](https://github.com/opauth/opauth/wiki) for more in-depth details, especially on how to use Opauth with your own PHP application.\n\nAvailable strategies\n--------------------\nA strategy is a set of instructions that interfaces with respective authentication providers and relays it back to Opauth.\n\nProvider-specific:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\t\u003cth\u003eStrategy\u003c/th\u003e\n\t\u003cth\u003eMaintained by\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=bitbucket.org\" alt=\"Bitbucket\" width=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"http://github.com/fancyguy/opauth-bitbucket\"\u003eBitbucket\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003efancyguy\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=disqus.com\" alt=\"Disqus\" width=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/rasa/opauth-disqus\"\u003eDisqus\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003erasa\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=do.com\" alt=\"Do\" width=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/arbales/opauth-do\"\u003eDo\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003earbales\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=facebook.com\" alt=\"Facebook\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/facebook\"\u003e\u003cstrong\u003eFacebook\u003c/strong\u003e\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=www.flickr.com\" alt=\"Flickr\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/pocket7878/opauth-flickr\"\u003eFlickr\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003epocket7878\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=www.foursquare.com\" alt=\"Foursquare\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/pocket7878/opauth-foursquare\"\u003eFoursquare\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003epocket7878\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=github.com\" alt=\"GitHub\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/github\"\u003eGitHub\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=google.com\" alt=\"Google\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/google\"\u003e\u003cstrong\u003eGoogle\u003c/strong\u003e\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=instagram.com\" alt=\"Instagram\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/muhdazrain/opauth-instagram\"\u003eInstagram\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003emuhdazrain\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=linkedin.com\" alt=\"LinkedIn\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/linkedin\"\u003eLinkedIn\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=live.com\" alt=\"Live Connect\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/live\"\u003e(Windows) Live\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=mixi.co.jp\" alt=\"mixi\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/ritou/opauth-mixi\"\u003emixi\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003eritou\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=openid.net\" alt=\"OpenID\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/openid\"\u003eOpenID\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=paypal.com\" alt=\"PayPal\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/24hours/opauth-paypal\"\u003ePayPal\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003e24hours\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=weibo.com\" alt=\"Sina Weibo\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/dgrabla/opauth-sinaweibo\"\u003eSina Weibo (新浪微博)\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003edgrabla\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=twitter.com\" alt=\"Twitter\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\t\t\u003ca href=\"https://github.com/opauth/twitter\"\u003e\u003cstrong\u003eTwitter\u003c/strong\u003e\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003euzyn\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=vimeo.com\" alt=\"Vimeo\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/LubosRemplik/opauth-vimeo\"\u003eVimeo\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003eLubosRemplik\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=vk.com\" alt=\"VK\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/dgrabla/opauth-vkontakte\"\u003eVKontakte\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003edgrabla\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=developer.yahoo.co.jp\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/ritou/opauth-yahoojp\"\u003eYahoo! Japan (YConnect)\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003eritou\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\t\u003ctd\u003e\u003cimg src=\"http://www.google.com/s2/favicons?domain=business.line.me\" width=\"16\" height=\"16\"\u003e\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://github.com/opauth/line\"\u003eLINE\u003c/a\u003e\u003c/td\u003e\n\t\u003ctd\u003eYuzuru Suzuki\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\nGeneric strategy: [OAuth](https://github.com/opauth/oauth)\n\nSee [wiki's list of strategies](https://github.com/opauth/opauth/wiki/List-of-strategies) for an updated list of Opauth strategies or to make requests.\nRefer also to [strategy contribution guide](https://github.com/opauth/opauth/wiki/Strategy-contribution-guide) if you would like to contribute a strategy.\n\nRequirements\n-------------\nPHP 5 (\u003e= 5.2)\nwith [`allow_url_fopen`](http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) enabled\n\nContribute\n----------\nOpauth needs your contributions, especially the following:\n\n- More strategies\n  Refer to [wiki](https://github.com/opauth/opauth/wiki) for contribution guide and inform us when your work is ready.\n\n- Plugins for more PHP frameworks and CMSes\n  eg. Symfony, Laravel, WordPress, Drupal, etc.\n\n- Guides \u0026 tutorials\n  On how to implement Opauth on CakePHP app, etc.\n\n\nIssues \u0026 questions\n-------------------\n- Discussion group: [Google Groups](https://groups.google.com/group/opauth)\n  _Primary channel for support, especially usage questions._\n- Issues: [Github Issues](https://github.com/opauth/opauth/issues)\n- Twitter: [@uzyn](http://twitter.com/uzyn)\n- Email me: chua@uzyn.com\n- IRC: **#opauth** on [Freenode](http://webchat.freenode.net/?channels=opauth\u0026uio=d4)\n\n\u003cp\u003eUsed Opauth in your project? Let us know!\u003c/p\u003e\n\nChangelog\n---------\n####v0.4.5 _(25 Feb 2018)_\n- Fixed a Security Incident for unsafe serialize/unserialize. _(thanks @YuzuruS #124)_\n\n####v0.4.4 _(10 May 2013)_\n- Added HTTP User-Agent header. _(thanks @rkaldung #41)_\n\n####v0.4.3 _(10 January 2013)_\n- Fixed a `serverPost()` bug where user-supplied options were not applied correctly. _(thanks @ritou #26)_\n\n####v0.4.2 _(28 August 2012)_\n- Fix session to check for `session_id()` instead of `$_SESSION` _(thanks @sirikkoster #20)_\n\n####v0.4.1 _(22 July 2012)_\n- Not starting session if session is already started. _(thanks @Claymm)_\n- Fixed incorrect error message. _(thanks @Claymm)_\n- Removed `@` for `file_get_contents`. _(thanks @Takehiro-Adachi)_\n\n####v0.4.0 _(10 June 2012)_\n- `mapProfile()` and `clientGet()` for OpauthStrategy class.\n\n####v0.3.0 _(30 May 2012)_\n- Some unit testing\n- More consistent naming of Strategy's internal properties\n- Smarter loading of strategy, able to make a few guesses on where the class file might be at.\n\n####v0.2.0 _(23 May 2012)_\n- Opauth is now Composer compatible and listed on [Packagist](http://packagist.org/packages/opauth/opauth)\n    - Opauth now supports autoloaders\n    - If a strategy is not autoloaded, Opauth falls back and searches for it at `strategy_dir` defined in config.\n- Class name for strategy Foo should now be FooStrategy instead of Foo.\n    - This is to reduce the likelihood of class name collision due to Opauth not requiring the use of namespace.\n    - v0.1.0-type class name, ie. Foo, still works, but is now deprecated.\n\n####v0.1.0 _(22 May 2012)_\n- Initial release\n\nLicense\n---------\nThe MIT License\nCopyright © 2012-2013 U-Zyn Chua (http://uzyn.com)\n\nConsultation\n---------\nU-Zyn Chua is a Principal Consultant at [Zynesis Consulting](http://zynesis.com).\n","funding_links":["http://www.google.com/s2/favicons?domain=paypal.com"],"categories":["身份验证","PHP","目录","Table of Contents","Authentication","身份验证( Authentication and Authorization )","类库","身份验证和授权 Authentication and Authorization"],"sub_categories":["身份验证和授权 Authentication and Authorization","Authentication and Authorization","OAuth"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopauth%2Fopauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopauth%2Fopauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopauth%2Fopauth/lists"}