I'm using Laravel 5.3 and am having a headache with Authentication. I'm using make: auth. Until then it's simple, but let's look at the scenario below.
In my project, when I log in I send the email and password to the API (Node) which returns me a token if the user exists. So far it's okay. With the token and user data returned I would like to use Laravel's make: Auth to login. Just to continue using Auth :: user (), Auth :: check () and etc and keep the structure that Laravel already provides.
I did some research and did not find much about it.
Does anyone know if there is a way to do it? If so, can you give me an example? Or maybe I can create a Custom Authentication that can continue using Auth :: user (), Auth :: check () and etc? If anyone knows, I accept examples too. :)
UPDATE
The Project:
I'm using the Heroku platform ( link ) where my Web Service (Node) and Database (Mongo) are, and I'm using Laravel for my Website.
What I want to do:
When I log in, my ApiController sends with cUrl a request to the WebService by passing the user's email and password. The WebService will do the verification, if there is no user it returns null and if there is a user it returns me a token with the user data. What to do with the token and user data? As far as I know, I need to save a session. If I use Session to save the data I can not for example return the user using Auth :: user () or if I want to check I can not use Auth: check ().
Hence my doubt. Is there any way to save the token and user data and continue using Auth :: user (), Auth :: check () and etc?
These two links below help in understanding my question. I tried to follow a step by step to create a Custom Auth, but I got lost in sequence and could not get in touch with anyone who had the same doubt as me. :
Link 1: link
Link 2: link