I have 2 servers, the first is the client-side (Reactjs) and the second is nodejs api.
I authenticate users from client side with jwt.
Trying to implement facebook-login, what I did was using facebook-login-button package, successfully receiving user data, I send a xhr to the api server which will find the user by email or facebook ID or it will create one, then will respond with jwt token to authenticate other requests.
suppose someone knows your facebook id and your email, he can simply login as you. I couldn't figure out client-side (single-page-app) login with facebook at all, specially with passport.
what logic should I follow to this thing ?
[Facebook login from client side and api authentication with jwts]
via FrankenStein
No comments:
Post a Comment