omniauth

Gitlab and omniauth-pam Authentication

牧云@^-^@ 提交于 2019-12-13 17:26:49
问题 Basically I follow these instructions to add a custom omniauth provider: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#using-custom-omniauth-providers I want to use omniauth-pam: https://github.com/nickcharlton/omniauth-pam After adding the gem and configuring this in gitlab.yml: providers: - { name: 'pam' } It does not start anymore with this error: Received wrong number of arguments. [nil, nil] (ArgumentError) /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems

Devise + Omniauth Facebook redirecting to signup

让人想犯罪 __ 提交于 2019-12-13 15:59:24
问题 I have followed this guide spot on https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview First round it authenticated me, signed me in, and saved me to db. I cleared browser history and tested a different user. It takes new user to facebook page to sign in, and after sign in automatically redirects them to http://localhost:3000/users/sign_up#_=_ and does not sign them in or save to DB. Any Ideas? Routes get "static/home" devise_for :users, :controllers => { :omniauth_callbacks =>

How to use YML values in a config/initializer

懵懂的女人 提交于 2019-12-13 12:04:39
问题 I'm working to integrate facebook in my app. To do that I'm using koala, devise, and omniauth. For koala, I have /config/facebook.yml development: app_id: 123123132123 secret_key: dasadsasd1231231 test: app_id: 313131313 secret_key: das132asdads12132 production: app_id: dasdsadsadsadsa secret_key: adsdsa12das123fds21 I then also have with omniauth: /config/initalizers/omniauth.rb Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, 123123132123, 'dasadsasd1231231'

get first_name and last_name fields from facebook omniauth

与世无争的帅哥 提交于 2019-12-13 11:46:45
问题 I am now implementing omniauth feature into my app. Everything works fine except that i cant get the first and last name from the facebook. Here is my model code. def self.from_omniauth(auth) user = User.where(email: auth.info.email).first if user return user else where(provider: auth.provider, uid: auth.uid).first_or_create do |user| user.provider = auth.provider user.uid = auth.uid user.first_name = auth.info.first_name user.last_name = auth.info.last_name user.email = auth.info.email user

puma production server in background: omniauth logging to stdout failed cause error

守給你的承諾、 提交于 2019-12-13 07:44:24
问题 I am using rails + puma as my production server. I used httpd to set up virtual machine and forward request to localhost:3000. And the command I used to start up my puma server is(inside the app folder already) puma -e production -p 3000 & Everything with my web app is fine when I was still logged in the server with ssh. only that some logs actually appears on the screen(I did not pay attention to it). However, when I exited the ssh session. I cannot use omniauth(a gem). I looked inside the

Rails: Using OmniAuth (FB authorization), Reading Data From Facebook Hash

爷,独闯天下 提交于 2019-12-13 04:26:09
问题 Using OmniAuth, I successfully fetched the hash data from Facebook: stored in "auth" # extra=#] last_name="Jordan" link="http://www.facebook.com/michael" locale="en_US" middle_name="Ball" name="Michael Jordan" quotes="\"lalala\"\n\n\"lala\"" timezone=9 updated_time="2011-09-01T20:25:58+0000" username="mjordan82" verified=true>> info=# verified=true> provider="facebook" uid="123456879"> In User Model, I do as follows: def self.create_with_omniauth(auth) create! do |user| user.provider = auth[

Omniauth Strategies - Managing multiple users on a shared system

≡放荡痞女 提交于 2019-12-13 02:27:37
问题 I know what answers are going to be, but I just want to try my luck. Taking Facebook as an example say, I am using omniauth-facebook to allow users to log in to my site. Upon logging in, user may set up some privacy data on this site. Taking up a scenario, I have 2 users U1 and U2 . They both have individually logged in using Facebook at my site and have respectively authorized the app. Now considering a shared system, U1 comes to my site, clicks on Login using Facebook , authenticates

Google oauth2 with devise and omniauth processed as failure

落花浮王杯 提交于 2019-12-13 02:18:00
问题 I'm trying to configure a new rails4.2 app to authenticate against Google Oauth2. I seem to be successfully going through the process, but it's being treated as a failure. The initial authorisations seems to go well until google sends to the callback. Then it seems to be incorrectly identified as a failure. The error message given is: Could not authenticate you from Google because "Invalid credentials". I've googled for a solution, but to no avail. Is it possible to turn on additional logging

Omniauth Nginx Unicorn callback to wrong host URL

久未见 提交于 2019-12-13 01:27:14
问题 I've deployed a Rails app to a VPS server, and I'm using the Nginx/Unicorn combo, everything works fine, except that for some reason beyond my understanding, the Omniauth callbacks redirect wrong, ie. http://unicorn/users/auth/linkedin/callback?oauth_token=95218ed3-b426-45ab-b022-693d2a2447cb&oauth_verifier=25955 it should instead be: http://my-real-domain.com/users/auth/linkedin/callback?oauth_token=95218ed3-b426-45ab-b022-693d2a2447cb&oauth_verifier=25955 What's wrong? why is the callback

Omniauth not responding to GET Request

倖福魔咒の 提交于 2019-12-12 23:33:49
问题 I am trying to enable users with the option to signing in through Facebook. My authentication in managed by Devise and I'm using the Omniauth-Facebook gem. When I try to login the user through Facebook in my devise views (session/new.html.erb), the user is logged in successfully. new.html.erb <div><%= link_to image_tag('facebook_login.png'), user_omniauth_authorize_path(:facebook) %></div> However when I try to sign in the user in a different controller (using the exactly same code as above)