{"id":25391603,"url":"https://github.com/awes-io/auth","last_synced_at":"2025-10-30T17:31:25.090Z","repository":{"id":62490198,"uuid":"189628756","full_name":"awes-io/auth","owner":"awes-io","description":"🔑 Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).","archived":false,"fork":false,"pushed_at":"2019-10-10T17:20:10.000Z","size":145,"stargazers_count":38,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-21T14:30:48.935Z","etag":null,"topics":["2fa","auth","authentication","authorisation","authorization","authy","laravel","registration","socialite"],"latest_commit_sha":null,"homepage":"","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/awes-io.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"awesdotio","open_collective":"awesdotio"}},"created_at":"2019-05-31T16:51:51.000Z","updated_at":"2023-03-16T10:05:27.000Z","dependencies_parsed_at":"2022-11-02T11:15:52.754Z","dependency_job_id":null,"html_url":"https://github.com/awes-io/auth","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awes-io%2Fauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awes-io","download_url":"https://codeload.github.com/awes-io/auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239016774,"owners_count":19568302,"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":["2fa","auth","authentication","authorisation","authorization","authy","laravel","registration","socialite"],"created_at":"2025-02-15T15:56:06.484Z","updated_at":"2025-10-30T17:31:24.724Z","avatar_url":"https://github.com/awes-io.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026utm_medium=auth\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n        \u003cimg width=\"100\" src=\"https://static.awes.io/promo/Logo_sign_color.svg\" alt=\"Awes.io logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAuthentication\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eLaravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://repo.pkgkit.com/4GBWO/awes-io/auth/badges/master/coverage.svg\" alt=\"Coverage report\" \u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://www.pkgkit.com/4GBWO/awes-io/auth/version.svg\" alt=\"Last version\" \u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://repo.pkgkit.com/4GBWO/awes-io/auth/badges/master/build.svg\" alt=\"Build status\" \u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://www.pkgkit.com/4GBWO/awes-io/auth/downloads.svg\" alt=\"Downloads\" \u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/awes-io/auth.svg\" alt=\"License\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://www.pkgkit.com/4GBWO/awes-io/auth/status.svg\" alt=\"CDN Ready\" /\u003e \n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://static.pkgkit.com/badges/laravel.svg\" alt=\"laravel\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.awes.io/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/last-commit/awes-io/auth.svg\" alt=\"Last commit\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/awes-io/awes-io\"\u003e\n        \u003cimg src=\"https://ga-beacon.appspot.com/UA-134431636-1/awes-io/auth\" alt=\"Analytics\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.pkgkit.com/?utm_source=github\u0026amp;utm_medium=shields\"\u003e\n        \u003cimg src=\"https://www.pkgkit.com/badges/hosted.svg\" alt=\"Hosted by Package Kit\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.patreon.com/join/awesdotio\"\u003e\n        \u003cimg src=\"https://static.pkgkit.com/badges/patreon.svg\" alt=\"Patreon\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n##\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://static.awes.io/github/auth-cover.gif\" alt=\"Laravel Authentication\" title=\"Awes.io Authentication\" /\u003e\n\u003c/p\u003e\n\n\n## Table of Contents\n\n- \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n- \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\n    - \u003ca href=\"#social-and-two-factor-authentication\"\u003eSocial and two-factor authentication\u003c/a\u003e\n    - \u003ca href=\"#email-verification-resetting-passwords\"\u003eEmail verification \u0026 resetting passwords\u003c/a\u003e\n- \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n- \u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\n\n## Installation\n\nVia Composer\n\n``` bash\n$ composer require awes-io/auth\n```\n\nThe package will automatically register itself.\n\nYou can publish migrations:\n\n```bash\nphp artisan vendor:publish --provider=\"AwesIO\\Auth\\AuthServiceProvider\" --tag=\"migrations\"\n```\n\nAfter migrations have been published you can create required db tables by running:\n\n```bash\nphp artisan migrate\n```\n\nPublish views:\n\n```bash\nphp artisan vendor:publish --provider=\"AwesIO\\Auth\\AuthServiceProvider\" --tag=\"views\"\n```\n\n## Configuration\n\nPublish config file:\n\n```bash\nphp artisan vendor:publish --provider=\"AwesIO\\Auth\\AuthServiceProvider\" --tag=\"config\"\n```\n\nYou can disable additional features by commenting them out:\n\n```php\n'enabled' =\u003e [\n    'social', \n    // 'two_factor',\n    // 'email_verification',\n],\n```\n\nAdd new socialite services:\n\n```php\n'services' =\u003e [\n    'github' =\u003e [\n        'name' =\u003e 'GitHub'\n    ],\n    ...\n],\n'github' =\u003e [\n    'client_id' =\u003e env('GITHUB_CLIENT_ID'),\n    ...\n],\n```\n\nAnd configure redirect paths:\n\n```php\n'redirects' =\u003e [\n    'login' =\u003e '/twofactor',\n    'reset_password' =\u003e '/',\n    ...\n],\n```\n\n### Social and two-factor authentication\n\nSeveral .env variables required if additional modules were enabled in config:\n\n```php\n# SOCIALITE GITHUB\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\nGITHUB_REDIRECT_URL=http://auth.test/login/github/callback\n\n# TWO FACTOR AUTHY\nAUTHY_SECRET=\n```\n\nIf you enabled social and/or two factor authentication add respective traits to User model class:\n\n```php\nuse AwesIO\\Auth\\Models\\Traits\\HasSocialAuthentication;\nuse AwesIO\\Auth\\Models\\Traits\\HasTwoFactorAuthentication;\n\nclass User extends Authenticatable\n{\n    use HasSocialAuthentication, HasTwoFactorAuthentication;\n}\n```\n\n### Email verification \u0026 resetting passwords\n\nTo use email verification functionality and to reset passwords, add `SendsEmailVerification` and `SendsPasswordReset` traits:\n\n```php\nuse AwesIO\\Auth\\Models\\Traits\\SendsPasswordReset;\nuse AwesIO\\Auth\\Models\\Traits\\SendsEmailVerification;\n\nclass User extends Authenticatable\n{\n    use SendsEmailVerification, SendsPasswordReset;\n}\n```\n\n## Usage\n\nAdd to routes/web.php:\n\n```php\nAwesAuth::routes();\n```\n\nYou can disable registration:\n\n```php\nAwesAuth::routes(['register' =\u003e false]);\n```\n\nPackage will register several routes.\n\n##### Besides default authentication routes, it will add:\n* Socialite routes\n    * `'login.social'`\n    * `'login/{service}/callback'`\n* Two factor authentication setup routes\n    * `'twofactor.index'`\n    * `'twofactor.store'`\n    * `'twofactor.destroy'`\n    * `'twofactor.verify'`\n* Two factor authentication login routes\n    * `'login.twofactor.index'`\n    * `'login.twofactor.verify'`\n* Email verification routes\n    * `'verification.resend'`\n    * `'verification.code.verify'`\n    * `'verification.code'`\n    * `'verification.verify'`\n\n## Testing\n\nYou can run the tests with:\n\n```bash\ncomposer test\n```\n\n## Contributing\n\nPlease see [contributing.md](contributing.md) for details and a todolist.\n\n## Credits\n\n- [Galymzhan Begimov](https://github.com/begimov)\n- [All Contributors](contributing.md)\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","funding_links":["https://patreon.com/awesdotio","https://opencollective.com/awesdotio","https://www.patreon.com/join/awesdotio"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawes-io%2Fauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawes-io%2Fauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawes-io%2Fauth/lists"}