Note: I have asked a similar question here: Laravel: Using multiple columns for authentication but this question is referring specifically to Passport.
I have a Laravel 6 application that uses Passport.
In a typical application, the user would just specify their email, where the email is unique.
However, in my application, I have 2 columns in the User model that is used to authenticate users.
- app_id (usually sent as a header)
- unique(app_id, email)
So in order to login, we need to pass both an app_id and an email, along with the password. The same email could be used across different app_ids.
How would I achieve this?