@skycoder Passport uses the bearer token to look up the user associated with that token, so long as the token is valid and you’re using the correct guard (usually api).
Aug 7, 2019
1
Level 5
How to properly use api auth with passport
I am wondering is using auth()->user() usable with passport auth?
Currently I am using attempt method for login and on localhost I had no problem but on server I needed to add to use web instead of api to work with it. Now I am wondering is that right anyway?
Since I don't use session and cookies, when I send bearer token through headers does it directly check within database and then store User within auth()->user() or how does it work?
Please or to participate in this conversation.