I have more conteptual question, how exactly should I handle social login in my project. The use case is that I would like to allow user to login with Facebook, and keep on my backend information about this user (email, firstname, lastname)
I have some proposal Flow, but I'm not sure if it's a proper approach.

Let's say that I have application architecture as above. Now I would like to explain step-by-step full success flow.
- Client (Vue application) make a call to AuthProvider (Facebook)
- AuthProvider returns
access_token - Client after reciving
access_tokenmake a call to backend endpoint like/fb_profilewithaccess_tokenanduserID(?) - Backend make a call to AuthProvider to check if given by client
access_tokenis valid or not. - AuthProvider returns information about user. Backend after getting information about user, save it to database and generate new JWT token
- Backend returns generated token to user
Now my question is - Is this good approach? Or should i handle it in other way? Like keep more logic to backend part? Instead of make a call to Facebook from Client, maybe should I make a call to backend, and backend make a call to Facebook?





