I am learning to build just the rest services (without any clients) using node.js and passport. So far I was able to figure about how to establish a facebook stratergy but all these examples knows about the client side, so it is serving up the pages on successful or failure scenario. Since I do not have any idea who the clients would be, I have following questions;
Since the original call might have returned back to client without waiting for call back, how do we go about creating the authentication in such a way, then the same client come back to see the status of the authentication, we put the token in the session on server side authentication completed?
Is there any write up anywhere it explains how to build just the rest services with passport or any other form of social media authentication?
Asked
Active
Viewed 760 times
1

Nair
- 7,438
- 10
- 41
- 69
-
I found the closest answer here http://stackoverflow.com/questions/14572600/passport-js-restful-auth – Nair Apr 29 '15 at 09:00
1 Answers
1
I found the closest answer here passport.js RESTful auth
For mobile apps, since the social media authentication happens at the client side, no need to have auth and callback at the server side. Rather, establish a trust relationship with a client by means of some encrypted secret code and use https to pass the request back to server from client once authenticated in client and update the server with authenticated token.