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

1

7

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.

Sylvestersylvia answered 8/3, 2012 at 10:45 Comment(0)
C
6

Check out the following post:

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

Chapland answered 8/4, 2012 at 19:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.