omniauth

LinkedIn photo_urls or picture-urls::(original) not being returned

早过忘川 提交于 2019-12-02 20:52:06
So I am using omniauth and devise for LinkedIn authentication in my Rails 5 app. omniauth-linkedin-oauth2 (0.2.5) devise (4.4.1) Everything is working great for the most part and users are able to signup and authenticate using LinkedIn. However the default image that is returned in "auth.info.image" is 50x50 which is too small. I've done a lot of reading on this and the suggested way forward is adding "picture-urls::(original)" to the devise fields list. This is consistent with what I see in the documentation ( https://developer.linkedin.com/docs/fields/basic-profile ). This however does not

Retrieving Medium or Large Profile Image from Twitter with omniauth-twitter

六眼飞鱼酱① 提交于 2019-12-02 19:47:48
I'm using omniauth-twitter gem to authenticate users through twitter. I am also using their Twitter profile image as their avatar for my site. However, the image I get from Twitter is low resolution. I know Twitter has better resolution pics available. How do I get it? Here is what I am currently doing. It is a method in the user model. It works, just doesn't get me a good quality pic: user.rb def update_picture(omniauth) self.picture = omniauth['info']['image'] end I thought maybe I could pass a size option onto it somehow, but can not seem to find a good solution. I'm using the omniauth

How to downgrade bundler or upgrade rails?

℡╲_俬逩灬. 提交于 2019-12-02 18:40:56
I added omniauth gem to my gemfile and tried to run bundle install, but got a message about incompatibility of rails and bundler versions. I tried to update rails, but got messages about incompatibility with other gems. How can I downgrade bundler to 1.0? $ bundle install Fetching gem metadata from http://rubygems.org/...... Fetching gem metadata from http://rubygems.org/.. Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 3.0.0) ruby depends on bundler (~> 1.0.0) ruby Current Bundler version: bundler (1.1.1) This Gemfile requires a different version of Bundler

Making OmniAuth, Devise and Koala work together

扶醉桌前 提交于 2019-12-02 18:37:51
I have an app in which I am implementing authentication using devise and omniauth. Ive got the logging in / out etc figured out, what i wanted to know was, what is the most efficient way to have a connection to the users graph api end point initialised and ready for use within my application. eg: If on the profile page i wanted to do, profile_image = current_user.fbgraph.get_picture("me") How would I accomplish this with the least number of API calls (i will be using similar calls throughout the application) You can accomplish this using something like Koala . When you authenticate the user,

Switching between web and touch interfaces on Facebook login using Omniauth and Rails 3

帅比萌擦擦* 提交于 2019-12-02 18:37:26
The situation: Using Rails 3 and OmniAuth, I have an app that authenticates using the Facebook strategy. This app has been built to work equally-well for web and mobile interfaces (ala Jquery-Mobile). The challenge is to get OmniAuth to provide the mobile version of Facebook's login screen to mobile devices and the web version to desktop devices. I've hacked together a solution which I'll put as an answer. Actually, since OmniAuth::Strategies are already Rack middleware, its even simpler. Just override the request_phase method and check the @env instance variable present in the strategy for a

Which Ruby gems support the Facebook API?

六眼飞鱼酱① 提交于 2019-12-02 16:21:43
I have a rails application using the Facebook API. I've seen several different Ruby gems for integrating with Facebook, but they look dated. Is it best to write low-level calls myself? Is there a decent and current gem available? Have any of these gems changed recently? I'm beginning a new project -- which gem should I use as of September, 2012? The Koala Gem is the way to go. These Railscasts from July will tell you all you need to know about interacting with the Social Graph in Ruby and in Rails (both are paid episodes): #361: Facebook Graph API : Learn how to use the Facebook Graph API with

Rails 3 - Devise : How to skip the 'current_password' when editing a registration?

喜夏-厌秋 提交于 2019-12-02 16:00:27
I've implemented omniauth with my devise model, so I can authenticate using other services. Password is not necessary anymore for my model, as users can authenticate using twitter, facebook... Everything is working fine, but, when an user try to edit its registration, devise skip the process because the user did not inform the 'current_password' (which doesnt exist in some cases now). I created a registration controller to overwrite the devises one: class RegistrationsController < Devise::RegistrationsController def update super end end But I haven't find any documentation about how to skip

How to rescue OmniAuth::Strategies::OAuth2::CallbackError?

夙愿已清 提交于 2019-12-02 15:29:43
I am building a Rails application with Omniauth for log in service.To authenticate Google I am using OmniAuth Google OAuth2 Strategy . When user clicks 'allow access' button everything works fine.But when user clicks 'no thanks' button the below error is raised. OmniAuth::Strategies::OAuth2::CallbackError I have tried adding the below rescue code in application controller. class ApplicationController < ActionController::Base rescue_from OmniAuth::Strategies::OAuth2::CallbackError, :with => :omniauth_callback_error_handler protected def omniauth_callback_error_handler redirect_to init_sign_in

The parameter app_id is required on Heroku omiAuth facebook Integration

纵然是瞬间 提交于 2019-12-02 14:59:11
问题 I am getting the error "The parameter app_id is required" when I test my facebook login in my app. I guess it has to do with my configurations. Can you please check my configuration files and let me know if there is an error. I even set the app id and secret on heroku heroku config:set FACEBOOK_APP_ID=133333333463066 FACEBOOK_SECRET=a7244e333333333a7a2bf9492a6089a0 Here is my omniauth initializer file : config/initializer/omniauth.rb OmniAuth.config.logger = Rails.logger Rails.application

Omniauth-facebook hash not showing Facebook 'username' field, using rails 3

我与影子孤独终老i 提交于 2019-12-02 12:02:06
I've set up my rails 3 app to use omniauth-facebook, everything works fine but when I look at the omniauth hash as yaml there is no 'nickname' field, I can get the 'name' and 'email' but my validations fail to create a user because I can't grab the nickname for my app's username requirement. I've double checked my facebook account, under "Settings", and my username is displayed. ANy ideas why this would be happening? Thanks for the help. Here is an example of my omniauth hash, i've placed 'X' for privacy reason: --- !ruby/hash:OmniAuth::AuthHash provider: facebook uid: 'XXXXXXXXXXXXX' info: