I would like to have your proper opinions about my following situation:
Server-side: I have a backend API implemented using Express JS on NodeJS. The authentication system is based on JWT token-based implementation using Passport. I have also used FacebookStrategy for social authentication. The controller returns the token as a successful response for both social and local authentication.
Client-side: As the frontend of the project, I am using ReactJS. For social authentication, I have put a Link to a Route pointing to the URL for Facebook callback URL from my backend API which returns JWT token as a response. When we click to the link, it successfully redirects to the Facebook login page. After I filled the credentials and got login, it returns the JSON response containing the token in the page.
My concern: How can I obtain the token while I am using the Link to the backend API from client-side code?
Thank you in advance.