chiiya / filament-access-control

Admin user, role and permission management for Laravel Filament
MIT License
192 stars 24 forks source link

Sanctum FilamentUser Error #25

Closed vincenzotecnology closed 1 year ago

vincenzotecnology commented 1 year ago

Good afternoon everyone; The system presents an error when api sanctum token is requested for administrative users, as shown in the image below:

image

The resolution is to add the HasApiToken in the Model FilamentUser. As the default installation of Laravel 9x Sanctum is installed I will upload a PR correcting it and adding it to the Model.

chiiya commented 1 year ago

What's the use case for requesting a sanctum token for an admin user?

vincenzotecnology commented 1 year ago

Hello how are you?

We can use the connection if, for example, we have a control app and we need a connection api. I've been developing a lot of systems that admins would like to have access to in an app and control from it.

Greetings from Brazil

Samuel Vincenzo

chiiya commented 1 year ago

This is now solvable using a custom user model: 1.8.1