Coding on a laptop via Unsplash

While working on my latest project, I had to consider how I would handle API-based authentication. If you read the Laravel documentation, it clearly steers you toward using Laravel Passport. For those who don’t know, Passport is the OAuth2 server implementation used by Laravel.

Generally speaking, I will adopt the preferred approach when working in an area of code that is new to me. However, a quick skim through the docs immediately gave me pause. In short, there’s a lot to do. You have to run DB migrations, set up OAuth keys, create workflows for token generation etc.

I thought that there had to be a simpler way… it turns out there is.