Question

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.

Was it helpful?

Solution

Check out the following post:

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top