Livewire session return NULL in laravel Auth middleware

I hope you are well. I have a little problem that I’ll explain here in writing and in pictures. I have a livewire component that needs to send requests using jwt. But as the livewire get request is not sending the token, I decided to modify the Authenticate middleware of laravel in order to send the token that I put in session in the livewire component, via bearer in laravel auth middleware… the problem is that the variable that I added to the session in my livewire component, returns NULL when I try to retrieve it in the Authenticate middleware.

[Laravel auth middleware] https://i.stack.imgur.com/I9slA.png
[livewire component] https://i.stack.imgur.com/kfIzw.png

Why not just put token as a public variable in your livewire component?
Those are surely persistent.

I have already tried but nothing. When I put the token in the url, when calling my api, the api does not receive the token which is in GET. I’ve been thinking about using querystring in the livewire… But it doesn’t work because I use the jwt auth api of laravel for the autentication.

Why not to use a standard way of auth like Passport/Sanctum/etc? I think Sanctum is pretty simple and uses one token for Auth as well.

Well I think that even with sanctum or passport, the problem would be the same

Hi, did you manage to fix your problem?