0

I am using Rails 3.1 with Devise 1.4 and Omniauth 0.3. Have created omniauth strategy to authenticate through Facebook and it works nicely.

In javascript I am catching an event to know if user is already logged in to facebook.

FB.Event.subscribe('auth.login', function(response) {
  // respone contains user id with access token
});

What I cannot figure out is how to use that information to authenticate user. How do I tell devise that user is logged in?

Edijs Petersons
  • 537
  • 3
  • 6
  • 16
  • Did you followed instructions from [https://github.com/intridea/omniauth][1] [1]: https://github.com/intridea/omniauth – Mark Huk Nov 21 '11 at 13:02
  • Yes, but I have to call '/auth/:provider/callback' and only then I see values in request.env['omniauth.auth']. However it takes about 3 seconds. Is there another way how I can say to devise that I already got user_id and all I need is devise to know that without calling to '/auth/:provider/callback'. – Edijs Petersons Nov 21 '11 at 13:44

0 Answers0