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

TheOn3's avatar

How to disable register/login of Laravel and take advantage of API?

Hello there,

I am trying to get rid of the registration and login of Laravel and instead use an API. So just for the first time a user logs in, he/she gets registered automatically. (I want the primary key in my database for users table to be the user ID in that specific third-party website)

How could I do that?

0 likes
1 reply
morcen's avatar

Your requirement seems a bit off, especially the part where you want the user to get registered automatically after signing in.

But to answer your question generally, you will have to remove the Auth::routes() in your routes/web.php file so your system will not use the Laravel's built-in methods for logging in, registration, and account verification. Afterwards, you will have to create a matching route to catch all requests for logins and registrations, based on the requirements of your 3rd party service.

2 likes

Please or to participate in this conversation.