There is something I do not quite understand in order to start designing my API in laravel. I wish that only users who are logged into the application are able to consume the resources of the API.
I understand that I must send a token that identifies the user in each request that he makes from the client but where do I get this token from? I had thought of the following way:
But doing it this way generates some doubts:
I know it seems that I am answering the question myself, but I really want to know the most correct way to do it.
Thanks in advance.