0

I have an external server API made with node JS and mongo. I suppose user API is localhost:8010/api/login output how do I use that for auth in laravel ?

"users": [
  {
    "_id": "592e71bc05be3c26f6bda51d",
    "updatedAt": "2017-05-31T07:33:16.608Z",
    "createdAt": "2017-05-31T07:33:16.608Z",
    "userToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiRW1qb3kiLCJkYXRlIjoxNDk2MjE1OTk2NTk0fQ.25AY8EGoCmpcToidVWBU_czOKCFbV-dkrmCPUx6InD4",
    "name": "desert",
    "mobile": "123456789",
    "type": "N",
    "is_active": 1,
    "__v": 0
  } 
1
  • Post your code, what you have tried. Commented Nov 14, 2019 at 8:52

1 Answer 1

0

Auth::login method will see your desired job

$model = User::find(1);
Auth::login($model, true);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.