laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.82k stars 636 forks source link

If using sanctum how to authorization? #1440

Closed ouronghuang closed 2 months ago

ouronghuang commented 2 months ago

If using Sanctum API Token Authentication(https://laravel.com/docs/10.x/sanctum#api-token-authentication) how to authorization?

// How to carry token to obtain users
Gate::define('viewHorizon', function ($user) {
    return in_array($user->email, [
    //
    ]);
});
crynobone commented 2 months ago

Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.