I have a remote API where my users data is stored.
With Laravel, I am building a front end on a different server and I need to send that remote server my end-users email and password in order to authenticate and then receive my Bearer token access token.
iget-master/token-auth help me do that?
Thank you @martinbean ! I believe you are correct. I plan to have a dashboard page that users will need to log into and possibly a few other pages. The user will enter their username & pass once and that information will be sent to our remote API which will validate and respond back with the Bearer Token. I need to retrieve that, store it in the session and use it for validation as needed.
I have found a good amount of documentation that explains how to set up a users table and store the token in a database, but I can't seem to find information that explains how authenticating users against a remote service like this. I am not really supposed to have users in my database, our remote system already took care of all that.
In the documentation you suggested on adding a custom guard, I am not understanding how I can get the custom guard to speak with my remote service.
Creating a custom guard would be ideal, but I am about to give up and just try passing in the token using guzzle either through Middleware or directly within a Controller.
How can I create a custom Authentication provider that will authenticate a user from a remote API?
We have an API that will allow me to pass in user credentials and the remote API will return an api_token. How can I set up a custom provider to talk to that remote server?