Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

handisb's avatar

Lumen Authentication

Hi everyone!

I’ve been looking into Laravel and Lumen and I was wondering how well the authentication feature in Lumen worked. The official documentation says that the authentication in Lumen does not support session state, but I’m unclear as to what this means. Would this, for example, work for a user logging into their dashboard?

Any tips and advice would be appreciated!

0 likes
2 replies
tihoti's avatar

Basicly lumen is designed for micro-services and APIs and do not include session in it, you can use different type of authentication like token based but if you want to make something big just use Laravel. The question about dashboard is valid, if you need dashboard and stuff, just use Laravel.

martinbean's avatar

Would this, for example, work for a user logging into their dashboard?

@handisb No, because Lumen isn’t meant for web applications. It doesn’t support session authentication, so there’s nothing to “log in” to.

Lumen is meant for really simple APIs, so therefore is expected to use token-based authentication with it. However, I’d still choose Laravel over Lumen for APIs given Laravel comes with form requests for validation, route–model binding, Passport for OAuth authentication, Eloquent API resources, and many other features helpful for APIs.

Please or to participate in this conversation.