Oauth2 for Rails and Mobile Browsers

Hi All,

Can anyone recommend a viable solution for oauth2 and ruby on rails that
handles mobile browser detection with facebook, twitter, and google?
I've been using omniauth and it works great with normal web browsers.
However, as soon as I try to use a mobile browser, it breaks. Part of
the issue seems to be due to which URIs are being requested and what
display type is returned, whether it be touch or wap.

Any suggestions would be appreciated.


Okay I did some further behavior testing on several mobile devices with

It appears that when I physically type the url for:


Everything works fine. However, the default link_to is not working

I've tried:

<%= link_to image_tag("twitter_64.png", :size => "64x64", :alt =>
"Twitter"), "/auth/twitter" %>


<%= link_to image_tag("twitter_64.png", :size => "64x64", :alt =>
"Twitter"), "#{root_url}auth/twitter" %>

Both fail on the mobile device. What is the different between the
request states for "manual input", and link_to?

Now I'm curious..

And, I found my answer by hacking through some of the JQ Mobile code.

The issue was related to JQ Mobile. I ended up doing:

      <li><%= link_to image_tag("facebook_64.png", :size => "64x64",
:alt => "Facebook"), "#{root_url}auth/facebook", :rel => "external"
      <li><%= link_to image_tag("twitter_64.png", :size => "64x64", :alt
=> "Twitter"), "#{root_url}auth/twitter", :rel => "external" %></li>
      <li><%= link_to image_tag("google_64.png", :size => "64x64", :alt
=> "Google"), "#{root_url}auth/google", :rel => "external" %></li>

Just adding a simple :rel => "external" to bypass the ajax request and
it works.