Reputation: 8060
I am currently building an iPhone app with rails backend. I am using solely facebook 's Single Sign On (SSO) on the iphone and authentication works great on the client end pretty well. I am using devise on rails as the backend.
NOTE i have consulted Design for Facebook authentication in an iOS app that also accesses a secured web service already
I see that devise has something called token_authenticable which is essentially the "ticket" described in step 5 of that thread. This is the current flow I see
This is pretty straight forward. However, I have a couple of questions:
Upvotes: 12
Views: 2507
Reputation: 2318
Why can't you use omniauth-facebook gem. Its a very simple solution to get the access token for if you use devise its potentiality will double. Make sure that you need to get different access token at different login time.
You can go through this link https://github.com/pramodv-nyros/social-login-in-rails
Upvotes: 1
Reputation: 405
You have to use same token on server and ios client. A simple solution is put all logic on server side by device+omniauth, iOS only handle UI and response from server side. If you want to get token from iOS like use facebook iOS SDK, you should tell the token to Server side, but looks not safe.
Upvotes: 0