I am developing rest API in laravel using jwt. API supporting normal login as well as social network logins such as facebook and google.
In the case of facebook login,Where should I store access token?
If I stored access toeken as separate field,How can I do jwt authentication check,becuase it support email and password field only as follows,
$credentials = $request->only('name', 'password');
Is it right method to store access token in password fields itself?
Please help to find a solution.
I always store the access token in its own field in the database.
Then to login, I have a separate script for each type of login (Facebook, Google, Twitter, etc.) that can return a JWT and I simply use that JWT from then on to authenticate for each subsequent API request.
I've really enjoyed using the Dingo Api package for my APIs because it groups together some of the best practices for APIs.