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

ghbdigital's avatar

I want my user authenticate via external API in Laravel 8

I tried creating custom Auth service provider but that didn't worked, can any one help?

Just need simple authentication when the response from the api is true, login while save the userdata on the session

Thanks

0 likes
4 replies
ghbdigital's avatar

Sorry, Let me explain a little bit further

I have an API URL http://google.com/api And I wanted to take user input username and password then post to API URL in body. I receive response true if username and password both are correct else false.

Now how to use apply with laravel auth so that whenever i get response true, user able to login to the laravel application and save the username & password for further use in the application

Thanks

Please or to participate in this conversation.