{"id":21696644,"url":"https://github.com/patrickcurl/filament-auth","last_synced_at":"2026-05-17T18:35:56.861Z","repository":{"id":60397405,"uuid":"542860351","full_name":"patrickcurl/filament-auth","owner":"patrickcurl","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-29T01:41:07.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T09:37:47.336Z","etag":null,"topics":[],"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/patrickcurl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"patrickcurl"}},"created_at":"2022-09-29T01:15:46.000Z","updated_at":"2022-09-29T01:23:59.000Z","dependencies_parsed_at":"2022-09-29T02:20:16.869Z","dependency_job_id":null,"html_url":"https://github.com/patrickcurl/filament-auth","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/patrickcurl/filament-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Ffilament-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Ffilament-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Ffilament-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Ffilament-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickcurl","download_url":"https://codeload.github.com/patrickcurl/filament-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcurl%2Ffilament-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33149833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-25T19:21:03.270Z","updated_at":"2026-05-17T18:35:56.846Z","avatar_url":"https://github.com/patrickcurl.png","language":"PHP","funding_links":["https://github.com/sponsors/patrickcurl"],"categories":[],"sub_categories":[],"readme":"[![Latest Version on Packagist](https://img.shields.io/packagist/v/patrickcurl/filament-auth.svg?style=flat-square)](https://packagist.org/packages/patrickcurl/filament-auth)\n[![Semantic Release](https://github.com/patrickcurl/filament-auth/actions/workflows/release.yml/badge.svg)](https://github.com/patrickcurl/filament-auth/actions/workflows/release.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/patrickcurl/filament-auth.svg?style=flat-square)](https://packagist.org/packages/patrickcurl/filament-auth)\n\n# Filament User Authentication\n\nUser Resource For Filament Admin along with Roles \u0026 Permissions using Spatie\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require patrickcurl/filament-auth\n```\n\nand now clear cache\n\n```bash\nphp artisan optimize:clear\n```\n\nand publish config\n\n```bash\nphp artisan vendor:publish --tag=filament-auth-config\n```\n\nand optionally views / translations\n\n```bash\nartisan vendor:publish --tag=filament-auth-views\nartisan vendor:publish --tag=filament-auth-translations\n```\n\n## Additional Resources\n\n### Spatie Roles \u0026 Permissions\n\nIf you have not yet installed this package it run the following steps:\n\n```bash\n    composer require spatie/laravel-permission\n```\n\n1. You should publish the migration and the config/permission.php config file with:\n\n```php\nphp artisan vendor:publish --provider=\"Spatie\\Permission\\PermissionServiceProvider\"\nphp artisan migrate\n```\n\n2. Add the `Spatie\\Permission\\Traits\\HasRoles` trait to your Users model\nAlso add the following method to your User Model:\n\n```php\n    public function canAccessFilament() : bool\n    {\n        // Change this per your requirements.\n        return $this-\u003ehasRole('superadmin');\n    }\n```\n\n3. Add Roles \u0026 Permissions as required\n\nFor more see: \u003chttps://spatie.be/docs/laravel-permission/v5/introduction\u003e\n\n### Bouncer Roles / Permissions\n\nIf you have not yet installed this package it run the following steps:\n\n1. You should publish the migration and the config/permission.php config file with:\n\n```php\nphp artisan vendor:publish --provider=\"Silber\\Bouncer\\BouncerServiceProvider\"\nphp artisan migrate\n```\n\nAdd the following method to your User model :\n\n```php\n    public function canAccessFilament() : bool\n    {\n        // Change this per your requirements.\n        return Bouncer::is($this)-\u003ea('superadmin');\n    }\n```\n\nImplemented, but docs coming soon.\n\n### Laravel Impersonate\n\nIf you have not configured this package it is automatically added by this install, run the following steps:\n\n1. Add the trait `Lab404\\Impersonate\\Models\\Impersonate` to your User model.\n2. Setup your permissions: \u003chttps://github.com/404labfr/laravel-impersonate#defining-impersonation-authorization\u003e\n\n## Security\n\nRoles \u0026 Permissions can be secured using Laravel Policies,\ncreate your policies and register then in the AuthServiceProvider\n\n```php\n protected $policies = [\n        Role::class       =\u003e RolePolicy::class,\n        Permission::class =\u003e PermissionPolicy::class,\n        CustomPage::class =\u003e CustomPagePolicy::class,\n        SettingsPage::class =\u003e SettingsPagePolicy::class\n        // 'App\\Models\\Model' =\u003e 'App\\Policies\\ModelPolicy',\n    ];\n```\n\nWe have a Custom Page Trait: `FilamentAuth\\Traits\\PagePolicyTrait` and a Spatie Settings Page Trait `FilamentAuth\\Traits\\SettingsPage\\PolicyTrait` that you can add to your pages / settings pages.\nBy defining a model and mapping it with a `viewAny($user)` method you can define per policies whether or not to show the page in navigation.\n\n## Widgets\n\n  `LatestUsersWidget` is by default published to your dashboard, this can be configured / disabled by editing the config in the filament-auth config file:\n\n  ```php\n   'Widgets' =\u003e [\n        'LatesetUsers' =\u003e [\n            'enabled' =\u003e true,\n            'limit' =\u003e 5,\n        ],\n    ],\n```\n\nNote that it is also attached to the UserPolicy::viewAny policy value if the policy exists\n\n--It is planned to update the enabled to accept a callback function to allow for roles etc in the next version--\n\n## Profile\n\nProfile view for currently authed user\n\n## Extending\n\nExtend Profile:\n\n```php\n\u003c?php\n\nnamespace App\\Filament\\Pages;\n\nuse Filament\\Pages\\Page;\nuse FilamentAuth\\Pages\\Profile as PagesProfile;\n\nclass Profile extends PagesProfile\n{}\n```\n\nor the view: `resources/views/vendor/filament-auth/filament/pages/profile.blade.php` (you can publish existing one)\n\n## Events\n\n`FilamentAuth\\Events\\UserCreated`  is triggered when a user is created via the Resource\n\n`FilamentAuth\\Events\\UserUpdated` is triggered when a user is updated via the Resource\n\n## Intergration with other packages\n\n**Comming soon**\n\n- \u003chttps://filamentphp.com/plugins/socialite\u003e\n- \u003chttps://filamentphp.com/plugins/2fa\u003e\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Phpsa](https://github.com/phpsa/filament-authentication) Forked from this, added Bouncer.\n- [Patrick Curl](https://github.com/patrickcurl) Maintainer of this package.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcurl%2Ffilament-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickcurl%2Ffilament-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcurl%2Ffilament-auth/lists"}