Support the ongoing development of Laravel.io →
Authentication Security Requests

Hey dudes,

I am new to Laravel and therefore I wanted to know if it is possible to use the GetUserFromToken middleware of Tymon for protection "WEB"-routes in Laravel? I know that there is the default "auth"-middleware, which is shipped with Laravel, but, if I unterstand that all correct, this middleware is using the CSRF-Token.

I do not want to use two different tokens. In a thread of tymon github repo I read a topic which says that it is possible to use e.g. Auth::check() function, so that I can access on the current logged in user, if I use the middleware GetUserFromToken from Tymon.

But how can I handle to login flow then? Maybe I have a problem in understanding of the whole topic...

Makes this setup any sense, or am I completely wrong?

Thanks for your answers!

Kind regards,

Alex

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.