{"id":20763431,"url":"https://github.com/moontechs/filament-webauthn","last_synced_at":"2025-04-30T07:50:19.676Z","repository":{"id":61935652,"uuid":"546765291","full_name":"moontechs/filament-webauthn","owner":"moontechs","description":"Passwordless login for your Filament app. Webauthn server-side and front-end components.","archived":false,"fork":false,"pushed_at":"2023-01-18T22:58:20.000Z","size":510,"stargazers_count":14,"open_issues_count":1,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-30T14:11:12.610Z","etag":null,"topics":["2fa","2factor","fido","fido2","filament","filament-plugin","filamentphp","laravel","laravel-filament","php","relying-party","two-factor-authentication","webauthn"],"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/moontechs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-06T15:55:21.000Z","updated_at":"2025-01-05T08:51:56.000Z","dependencies_parsed_at":"2023-02-10T18:45:44.029Z","dependency_job_id":null,"html_url":"https://github.com/moontechs/filament-webauthn","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontechs%2Ffilament-webauthn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontechs%2Ffilament-webauthn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontechs%2Ffilament-webauthn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moontechs%2Ffilament-webauthn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moontechs","download_url":"https://codeload.github.com/moontechs/filament-webauthn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666227,"owners_count":21624291,"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","2factor","fido","fido2","filament","filament-plugin","filamentphp","laravel","laravel-filament","php","relying-party","two-factor-authentication","webauthn"],"created_at":"2024-11-17T10:44:04.554Z","updated_at":"2025-04-30T07:50:19.653Z","avatar_url":"https://github.com/moontechs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filament Webauthn Authentication (FIDO)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/moontechs/filament-webauthn.svg?style=flat-square)](https://packagist.org/packages/moontechs/filament-webauthn)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/moontechs/filament-webauthn/.github/workflows/run-tests.yml?branch=main)](https://github.com/moontechs/filament-webauthn/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/moontechs/filament-webauthn/.github/workflows/fix-php-code-style-issues.yml?branch=main)](https://github.com/moontechs/filament-webauthn/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/moontechs/filament-webauthn.svg?style=flat-square)](https://packagist.org/packages/moontechs/filament-webauthn)\n\nPasswordless login for your Filament app. Web Authentication server-side and front-end components.\n\nThe package has the following components:\n* registration button and widget\n* login form extension to redirect to the webauthn login page\n* separate route and page with webauthn login form\n\nShould work with HTTPS and not localhost only.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require moontechs/filament-webauthn\n```\n\nYou should publish and run the migrations with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-webauthn-migrations\"\nphp artisan migrate\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-webauthn-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'login_page_url' =\u003e '/webauthn-login',\n    'user' =\u003e [\n        'auth_identifier' =\u003e 'email', // column in users table with unique user id\n    ],\n    'widget' =\u003e [\n        'column_span' =\u003e '',\n    ],\n    'register_button' =\u003e [\n        'icon' =\u003e 'heroicon-o-key',\n        'class' =\u003e 'w-full',\n    ],\n    'login_button' =\u003e [\n        'icon' =\u003e 'heroicon-o-key',\n        'class' =\u003e 'w-full',\n    ],\n    'auth' =\u003e [\n        'relying_party' =\u003e [\n            'name' =\u003e env('APP_NAME'),\n            'origin' =\u003e env('APP_URL'),\n            'id' =\u003e env('APP_HOST', parse_url(env('APP_URL'))['host']),\n        ],\n        'client_options' =\u003e [\n            'timeout' =\u003e 60000,\n            'platform' =\u003e '', // available: platform, cross-platform, or leave empty\n            'attestation' =\u003e 'direct', // available: direct, indirect, none\n            'user_verification' =\u003e 'required', // available: required, preferred, discouraged\n        ],\n    ],\n];\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"filament-webauthn-views\"\n```\n\nYou can publish the translation file with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-webauthn-translations\"\n```\n\n## Usage\n\n* Install the package.\n* Publish migrations and migrate.\n\n### Registration widget\nOnly signed-in users can register a device to be able to sign in to use it in the future.\n\n* Register `Moontechs\\FilamentWebauthn\\Widgets\\WebauthnRegisterWidget::class` widget. \nAdd it to the `widgets.register` array of the Filament config.\n\n![widget](images/widget.png?raw=true)\n\n#### Customization\n* Publish the config file\n* `widget.column_span` - widget width ([docs](https://filamentphp.com/docs/2.x/admin/dashboard/getting-started#customizing-widget-width))\n\n### Registration button (without widget)\n* Add `\u003clivewire:webauthn-register-button/\u003e` in any view.\n\n#### Customization\n* Publish the config file\n* `register_button.icon` - choose any available icon\n* `register_button.class` - add more classes or change the default one \n\n### Redirect to the login page button\n\n* Publish Filament login page view `php artisan vendor:publish --tag=filament-views`\n* Add `\u003cx-filament-webauthn::login-form-extension /\u003e` in the end of the login form.\n\nIf you didn't want to use this button, you can use a simple redirect to a named route `filament-webauthn.login`.\n\n![redirect to login page](images/reditect-to-login-page.png?raw=true)\n\n### Login form\n#### Customization\n* Publish the config file\n* `login_button.icon` - choose any available icon\n* `login_button.class` - add more classes or change the default one\n\n![login](images/login.png?raw=true)\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Credits\n\n- [Michael Kozii](https://github.com/mkoziy)\n- [All Contributors](../../contributors)\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%2Fmoontechs%2Ffilament-webauthn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoontechs%2Ffilament-webauthn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoontechs%2Ffilament-webauthn/lists"}