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

deathmetalgore's avatar

Switch Laravel session driver to API in Laravel and not use Laravel's token auth

I'm currently creating a Laravel API with it's latest version 5.2.

I'm trying to use validation and what not, authentication and whatnot for my API. As for authentication, I have set up OAuth2 with the password grant, so I don't really need Laravel's token authentication.

However, I keep getting redirects etc. when using the default out of the box validation or the Auth controllers that come with Laravel.

I don't really wanna go through putting my code in try/catch-es, so I would prefer to simply use Laravel's generic JSON responses, even if I'm not specifically requesting JSON.

How do I use the API session driver with OAuth2 authentication?

0 likes
0 replies

Please or to participate in this conversation.