Skip to content

Commit

Permalink
Merge pull request #32 from MarJose123/feat_custom_auth_fields
Browse files Browse the repository at this point in the history
Updated README.md
  • Loading branch information
MarJose123 authored Jun 5, 2023
2 parents 8f7b21c + 958cbe6 commit 224927f
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,31 @@ Add this middleware `Locker::class` to your `Filament Config` and you're ready t
<summary>Config file: </summary>

```php
return [

<?php

use Filament\Facades\Filament;

return [

/*
* Lock Screen Icon
*/
'icon' => 'heroicon-s-lock-closed',

/*
| ------------------------------------------------------------------------------------------------
| Table Column Name
| ------------------------------------------------------------------------------------------------
| Change the table column name if your login authentication column is checking on a different field and not on the default field ('email and password') column of the table.
*/
'table_columns' => [
'account_username_field' => 'email',
'account_username' => Filament::auth()->user()->email,
'account_password' => 'password',
],

/* =======================================
* if `enable_redirect_to` is TRUE then after login, it will be redirected to the route setup under `redirect_route`
*/
Expand All @@ -56,6 +74,7 @@ return [
'rate_limit_max_count' => 5, // max count for failure login allowed.
'force_logout' => false,
],

/* =========================
* Path segmentation locking
* e.g., if the segment is enabled then locked_path = ['admin', 'employee']
Expand All @@ -68,8 +87,8 @@ return [
'segment' => [
'specific_path_only' => false, // if false, then all the request will be blocked by the locker and will be redirected to the authentication page
'segment_needle' => 1, // see the https://laravel.com/api/9.x/Illuminate/Http/Request.html#method_segment
'locked_path' => [] //
]
'locked_path' => [], //
],
];
```
</details>
Expand Down

0 comments on commit 224927f

Please sign in to comment.