omniauth

Omniauth - Display facebook connect as popup

烂漫一生 提交于 2019-11-30 08:53:55
I am using Omniauth and forcing /auth/facebook to display in a popup (with JS). [Instead of a new window - which is much less user friendly] The problem is: Omniauth loads the FB url with display=page Instead of what I want: display=popup Anyone knows how I can change the params Omniauth uses for facebook ? Thanks At where you set your Facebook ID and secret key, add one more extra option as: :display => "popup" Actually, in the current version of omniauth-facebook, this is what works for me: :authorize_params => { :display => 'popup' } kravc If you're using heroku, then use this option:

Is it possible to get Gmail oauth or xauth tokens with OmniAuth?

风流意气都作罢 提交于 2019-11-30 05:45:44
问题 I want to get oauth or xauth tokens from GMail to use with gmail-oauth. I'm thinking of using OmniAuth but it seems not to support GMail yet, which means that with stock OmniAuth is impossible. Is that correct? Am I missing something? 回答1: Omniauth has support for both OAuth and OAuth2, which will both allow you to authenticate a google account. Here are all of the strategies you can use via omniauth: https://github.com/intridea/omniauth/wiki/List-of-Strategies Here are the two google OAuth

OmniAuth doesn't work with Route Globbing in Rails3

蓝咒 提交于 2019-11-30 04:03:50
I am trying to follow the Railscast 241 Simple OmniAuth and it works fine unless I have Route Globbing at the end of /config/routes.rb : match '*uri' => "posts#index" If I request /auth/twitter with the globbing then OmniAuth does nothing: Started GET "/auth/twitter" for 127.0.0.1 at 2011-04-03 19:17:44 +0200 Processing by PostsController#index as HTML Parameters: {"uri"=>"auth/twitter"} Rendered posts/index.html.haml within layouts/application (9.0ms) Completed 200 OK in 103ms (Views: 14.6ms | ActiveRecord: 0.7ms) Without the globbing route it authenticates correctly. Is there a way to have

No 'Access-Control-Allow-Origin' header is present on the requested resource

我与影子孤独终老i 提交于 2019-11-30 03:23:36
I am using omniauth-facebook with AngularJS and CORS is not working correctly . My omniauth.rb is Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook,"xxxxx", "xxxxx", :scope => 'email,user_birthday,read_stream', :display => 'popup' end Everything works if i use it as rails app and request. But when i try to call 'http:\localhost:3000\users\auth\facebook" via Angular JS $http.get('/users/auth/facebook').success(function(data, status, headers, config) { console.log("back in success"); }). error(function(data, status, headers, config) { }); } i see following error in

Setup multiple providers with devise :omniauthable

雨燕双飞 提交于 2019-11-30 01:48:00
I just got "Devise 1.2 supports integration with OmniAuth tutorial" working but I'd like to setup multiple providers to refer the same user. I'm looking for some good sample code to look at. I'm also not sure "multiple providers" is possible with default "devise :omniauthable" implementation and I'd like to reach the "one user many providers" effect, like described by Ryan Bates 235-omniauth-part-1 , 236-omniauth-part-2 but I'm asking if a cleaner way, less hacked mixed models, could be possible in your opinion and may be, if you already know some examples. thanks in advance luca Markus Proske

OmniAuth Single Sign On with Devise, invalid_credentials

£可爱£侵袭症+ 提交于 2019-11-29 22:07:55
问题 I have 3 web apps - A, B and C. App A contains the user database. If accessing App B and App C, I would like the user to be redirected to App A to be authenticated, and then be returned back to whichever app they tried to access. At the same time, they should be logged in to all apps. Unless anyone has a better solution, I have gone with an OmniAuth/Devise combo solution as described in this blog post. I have forked and updated to Rais 3.1.2 a sample App A and a sample app B/C. App A -

Rails3: Devise internationalization does not localize “Password confirmation” and others

╄→гoц情女王★ 提交于 2019-11-29 19:21:19
问题 Here is my whole source code for a minimalist Devise+OmniAuth app. As you can see, the Japanese devise.ja.yml is in config/locales . PROBLEM: When I visit the site with lang=ja, some strings are not in Japanese but English: "サインアップ" is displayed correctly, but "Password confirmation" and others are still in English. Actually, I grep'd my the whole project and my entire .rvm directory: No file contain "Password confirmation" ! That's baffling. Where do those strings come from? How comes they

How do I refresh my google_oauth2 access token using my refresh token?

徘徊边缘 提交于 2019-11-29 07:05:05
I have a RoR app where I am authenticating against Google using omniauth and google_oauth2 where I am requesting offline access. How do I use my refresh token to request a current access token? Also, how can I refresh my access token when it no longer works? I don't want to have any user interface in this situation, assuming of course that the authorization hasn't been taken away. I don't see anything in google_oauth2 that handles fetching a new access_token with a refresh token, so it looks like you'll need to make the exchange directly. Google's official OAuth 2.0 documentation explains how

Devise, OmniAuth & Facebook: “Not found. Authentication passthru.”

馋奶兔 提交于 2019-11-29 06:13:36
Trying to follow along with https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview and I'm stumped. I've got config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET'] in my config/initializers/devise.rb, devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } in my routes.rb, and an OmniAuthCallbacks controller defined. When I visit user_omniauth_authorize_path(:facebook) , I get: Not found. Authentication passthru. I'm not sure what to do next. I am not using route globing, so I don't believe I need to define a passthru method, but doing so

OmniAuth Google OpenID WEBrick::HTTPStatus::RequestURITooLarge

非 Y 不嫁゛ 提交于 2019-11-29 05:38:44
I am using OmniAuth to allow users to log in with their Google OpenID accounts. When I try to log in in development mode with WEBrick, I get a WEBrick::HTTPStatus::RequestURITooLarge error. When I deploy it to my rails host, it works fine. Is there a different web server I should use instead of WEBrick? Strange, I wonder what the URI length limit is for WEBrick. You could try thin http://code.macournoyer.com/thin/ . I use this locally for development sometimes and it seems to work great. As mentioned in railscast 236 for OmniAuth, WEBrick has trouble with long urls given by OpenID. The