Laravel how to set auth user with login info received from external API (another Laravel app)
I have two separate Laravel apps, one is a restful API with database, another is the client without database. The client login through the API app with sanctum token, once the client received user info, is it possible to set auth user in client? So I can use things like auth()->user()->email or directives in blade files such as @can(‘permission’) to check logged-in user’s role & permissions. Thanks
Change Users table with sanctum
Does Any one has and idea how to use applicants table (for example) instead of users table with laravel sanctum?
how to distinguis errors message between expired token and invalid token
I want in my API response when token expired it will return message “token expired” with status code 419, and when token invalid return “Unauthenticated” with status 401.
how to distinguis errors message between expired token and invalid token
I want in my API response when token expired it will return message “token expired” with status code 419, and when token invalid return “Unauthenticated” with status 401.