Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

msibraim's avatar

Web and API Auth Together

HI

I am building a hybrid APP, in which primarily authentication is done with laravel through API passport, however after which i am opening web views and need to use the same authenticated user

is this available in laravel? i am not sure how to implement it and ideas are fairly welcomed

thanks a lot

best regards

0 likes
3 replies
bugsysha's avatar

User is a user. So unless there is something fundamentally different, like one login method is passwordless and the other has a password, it should work.

msibraim's avatar

How does laravel identify it is the same user, i.e.: if the app first login with API through passport then i open a webview with a blade reading some paramter from user, how to identify it is the same logged in user

bugsysha's avatar

You do not have to do anything, Laravel will do that. And that is the only match for that email address and password. Email address is marked as unique in the database. Not sure what is confusing you.

Please or to participate in this conversation.