laravel-webauthn icon indicating copy to clipboard operation
laravel-webauthn copied to clipboard

Dynamic model used instead of forcing to use User

Open zaidysf opened this issue 2 years ago • 1 comments

Any possibility to dynamically change default auth model from User to another model since Laravel support dynamic auth model? e.g : In my case, I am using Staffs (not Users) table which has staff_id (not user_id) as the primary key.

zaidysf avatar Jun 26 '22 01:06 zaidysf

I did not test it, but I guess you can do it. This package is not tied to the User model. You'll just have to adapt the migration script for you, and use Staffs as model provider in config/auth.php config file. Note that it must implement Illuminate\Contracts\Auth\Access\Authorizable which is a Laravel constraint.

asbiin avatar Aug 20 '22 11:08 asbiin