0
votes

I have an app installed on many sites. There are two parts to the app: a dashboard for admins and a front end for visitors.

The admin dashboard consumes my Laravel API flawlessly when a user is authenticated via the Laravel Passport auth API. I need the front end app to communicate with the Laravel API anytime a visitor (non-admin/not logged in) loads the front end.

The problem is authenticating the front end API request to only allow interaction with the correct organization's records.

How do I get Laravel Passport to create an API key based on a logged in user, return it to the admin, and authenticate some requests using this API key?

Using Angular 9 for the admin and front end apps, Laravel 7 for the API

1

1 Answers

0
votes

I ended up switching to Laravel Sanctum for this project because it is more suited for this kind of project.