{"id":21440337,"url":"https://gitlab.com/thyseus/yii2-auth0","last_synced_at":"2026-03-10T14:34:42.142Z","repository":{"id":57069346,"uuid":"16188581","full_name":"thyseus/yii2-auth0","owner":"thyseus","description":"Yii2 Auth0","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":null,"default_branch":"master","last_synced_at":"2025-11-27T16:37:53.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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":null,"metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-07T06:26:28.341Z","updated_at":"2022-03-14T21:12:22.115Z","dependencies_parsed_at":"2022-08-24T14:54:16.304Z","dependency_job_id":null,"html_url":"https://gitlab.com/thyseus/yii2-auth0","commit_stats":null,"previous_names":[],"tags_count":20,"template":null,"template_full_name":null,"purl":"pkg:gitlab/thyseus/yii2-auth0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thyseus%2Fyii2-auth0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thyseus%2Fyii2-auth0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thyseus%2Fyii2-auth0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thyseus%2Fyii2-auth0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/thyseus","download_url":"https://gitlab.com/thyseus/yii2-auth0/-/archive/master/yii2-auth0-master.zip","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/thyseus%2Fyii2-auth0/sbom","scorecard":null,"host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4521539,"owners_count":7348,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2026-01-12T22:45:04.389Z","status":"online","status_checked_at":"2026-03-10T02:00:07.178Z","response_time":281,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.382Z","robots_txt_url":"https://gitlab.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":[],"created_at":"2024-11-23T01:11:26.259Z","updated_at":"2026-03-10T14:34:42.119Z","avatar_url":null,"language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"thyseus\\auth0\n=============\nYii2 Auth0\n\nCredits\n-------\nThis is a modernized fork of the abondoned anli/yii2-auth0 project. The old one uses a very \nold version of auth0, so i decided to make a hard fork and modernize it.\n\nIt does _not_ use auth0-lock anymore but plain php registration.\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n    php composer.phar require --prefer-dist thyseus/yii2-auth0 \"*\"\n\nor add\n\n    \"thyseus/yii2-auth0\": \"*\"\n\nto the require section of your `composer.json` file.\n\nAdd this to your `composer.json`. It is necessary for yii2-auth0 to detect your\napplications user model:\n\n```json\n \"autoload\": {\n        \"psr-4\": {\n            \"app\\\\models\\\\\": \"models/\"\n        }\n    },\n```\n\nConfiguration\n-------------\n\nEnsure to have `Yii::$app-\u003euser` configured in your application.\n \nYou will also need to have an `app\\models\\User.php` with at least this attributes:\n\nusername\nemail\npassword\nsource\ncreated_at\nupdated_at\n\nconfigured properly for this extension to work. yii2-auth0 will place the string 'auth0' into\nthe 'source' attribute to mark this user as auth0 user.\n\nUpdate the `modules` section with:\n\n```php\n    [\n     'auth0' =\u003e require __DIR__ . '/auth0.php',\n    ],\n```\n    \nAdd a config/auth0.php. You could handle your development keys here:\n\n```php\n\u003c?php\n$config = [\n        'class' =\u003e 'thyseus\\auth0\\Module',\n        'adminEmails' =\u003e ['admin@example.com'],\n    ];\n\n$filenameLocal = __DIR__ . '/auth0_local.php';\n\nif (file_exists($filenameLocal)) {\n    return array_merge($config, require $filenameLocal);\n}\n\nreturn $config;\n```\n\nFor the productive keys, you can create a new file in `config/auth0_local.php`:\n\n```php\n\u003c?php\n    return [\n        'serviceId' =\u003e '',\n        'domain' =\u003e '', // just domain, without protocol (without https://)\n        'client_id' =\u003e '',\n        'client_secret' =\u003e '',\n        'redirect_uri' =\u003e '',\n        'redirect_uri_logout' =\u003e '', // @see https://auth0.com/docs/quickstart/webapp/php/#logout\n        'api_tokens' =\u003e [\n            'users_read' =\u003e '',\n            'users_update' =\u003e '',\n        ]\n    ];\n```\n\nAnd add it to your to your `.gitignore` file, so live keys are not pushed into your repository:\n\n    /config/auth0_local.php\n\nLogin to auth0 (https://manage.auth0.com/dashboard) and update the `Allowed Callback Urls` in \nyour setting page.\n\nUsage\n-----\n\nUpdate your `url` section for your login button to `[/auth0/user/login]`.\n\nUpdate your `url` section for your logout button to `[/auth0/user/logout]`.\n\nTo show the login user, use:\n\n    Html::encode(Yii::$app-\u003euser-\u003eidentity-\u003eusername);\n\nFAQs\n----\n\nIf you encounter the following error\n\n    \\JWT not found\n\nChange the `firebase/php-jwt` version to `v2.2.0`:\n\n    cd @vendor/firebase/php-jwt\n    git checkout v2.2.0\n\nUpdate the `@vendor/composer/autoload_classmap.php` with:\n\n    'BeforeValidException' =\u003e $vendorDir . '/firebase/php-jwt/Exceptions/BeforeValidException.php',\n    'JWT' =\u003e $vendorDir . '/firebase/php-jwt/Authentication/JWT.php',\n\nIf you encounter the following error:\n\n    Cannot handle token prior to 2015-08-05T10:42:34+0200\n\nAnd your system time forward a few minutes.\n\nIf you encounter the following error:\n\n    cURL error 60: SSL certificate problem: self signed certificate in certificate chain\n\nDownload [CA](http://curl.haxx.se/ca/cacert.pem) to;\n\n    C:\\xampp\\php\\ca\\cacert.pem\n\nand update C:\\xampp\\php\\php.ini with\n\n    curl.cainfo=C:\\xampp\\php\\ca\\cacert.pem\n\nRestart your apache2 server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fthyseus%2Fyii2-auth0","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fthyseus%2Fyii2-auth0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fthyseus%2Fyii2-auth0/lists"}