Build API Authentication with Laravel Passport

Cerwyn Cahyono
8 min readMay 17, 2020
Image from https://github.com/laravel/passport

When you are building a web application with Laravel, authenticating your user is a crucial step because we don’t want an unauthenticated user to do something malicious in our app or do something we don’t expect to. You should always protect your routes with the authentication middleware, or if you want to take a step further, you can protect it with the authorization as well.

--

--

Cerwyn Cahyono

PHP/Backend Engineer at Undercurrent Capital Pte Ltd — Data Science Enthusiast