Unik6065
Unik6065

Reputation: 103

Best way to authenticate and identify individual screens in a Laravel API using Passport

I'm fairly new to Laravel, and I'm working on a project for independent restaurants to have ordering screens (similar to those at McDonald's).

This is an API-based application, and I'm using Laravel Passport to authenticate users. A restaurant manager can add multiple screens, and I want the workflow for adding a new screen to be as follows:

  1. The manager logs into their account.
  2. They add a new screen through the system.
  3. They go to the physical screen and open the login page in a browser.
  4. They authenticate the screen.
  5. The screen then starts displaying the menu.

The screen will use a webpage to show the menu and communicate with the API.

I was considering using a Personal Access Token (PAT), but I’m unsure whether I can "forward" the token from the manager’s device to the screen securely. I don’t think I can use a Client Credentials Token since I need to identify which screen is making API requests.

Question:

What would be the best approach to authenticate and identify individual screens in this scenario? Are there better authentication mechanisms I should consider?

Thanks for your help!

Upvotes: 0

Views: 30

Answers (0)

Related Questions