Victor Lam
Victor Lam

Reputation: 3710

How to create a session in iOS native app, using Facebook OAuth and Rails Devise gem?

We have a web app running on Rails, using Devise and OmniAuth for user authentication.

We are now building a iOS native app for the web app. We don't really know what's the best practice to implement this.

We will create a button for user login with facebook, when users click on it, they will be redirected to Facebook native app for authentication.

Controllers in Rails are secure by Devise. If the iOS app want to talk with the web app, the iOS itself are required to create a session which can communicate with Devise

The Facebook native app only return a Facebook access token. We can't use this token to create a Devise session.

So.....

  1. How can we create a Devise session with this combination?
  2. Is there any better solution for this purpose?

Thank all.

Upvotes: 7

Views: 3007

Answers (1)

Karan
Karan

Reputation: 15104

Check out the following post:

http://matteomelani.wordpress.com/tag/rails/

Upvotes: 6

Related Questions