omniauth

Unable to authenticate with omniauth-instagram, client_id missing

China☆狼群 提交于 2019-12-12 16:29:10
问题 I am authenticating using OmniAuth with both Twitter and Instagram. Twitter is working well. When I start the authentication process with the /auth/instagram request, OmniAuth is not including the client_id in the authorization header. I have initialized OmniAuth as: Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, ENV.fetch('TWITTER_CONSUMER_KEY'), ENV.fetch('TWITTER_CONSUMER_SECRET') provider :instagram, ENV.fetch('INSTAGRAM_CLIENT_ID'), ENV.fetch('INSTAGRAM

Rails 5 devise omniauth-facebook Error: Sorry, something went wrong

China☆狼群 提交于 2019-12-12 13:49:32
问题 I am following Devise's official guide from top to this section. My CALLBACK_URL is http://localhost:3000/users/auth/facebook/callback , which I think might be the problem but I'm not sure. When I click on Sign in with Facebook, I run into this error: Sorry, something went wrong. on this link: https://www.facebook.com/v2.6/dialog/oauth?client_id=193217371133539&redirect_uri=https%3A%2F%2Flocalhost%3A3000%2Fusers%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=user%2Cpublic_repo&state

Remember login with OmniAuth

寵の児 提交于 2019-12-12 10:24:21
问题 Is there an easy way to implement "remember me" functionality with OmniAuth? I'm using Facebook, Identity and LinkedIn, and I'm looking for a way to keep the user logged in to my site across sessions. 回答1: Basically you set another cookie on the client which persists the userid. Then use that userid to sign the user in (or at least recognise them) on subsequent visits. Remember Omniauth just does authentication, not the session management stuff so you need to do this outside Omniauth. Look at

Could not find devise mapping for path “/users/”. How come?

久未见 提交于 2019-12-12 09:55:42
问题 I am working with devise/omniauth right now. After signing up through facebook/twitter, I want to redirect to a page called "verify-email" where they can verify that their email address is correct. I am just trying to get the localhost:3000/users/verify-email page to work right now. I go to that url and I get this error message: Could not find devise mapping for path "/users/update_email". This may happen for two reasons: 1) You forgot to wrap your route inside the scope block. For example:

'rails generate model…' returns nothing

落爺英雄遲暮 提交于 2019-12-12 05:25:07
问题 So I'm currently following this tutorial: http://net.tutsplus.com/tutorials/ruby/how-to-use-omniauth-to-authenticate-your-users/ And are suck on Step 5. I managed to do step 4 which uses the generate command to create a new controller file. Now I need to create a model for User with name and email as attributes. having typed in: 'rails generate model User name:string email:string' It just hangs for a couple seconds before returning nothing and just providing me access to the command line

Simple OmniAuth-Twitter failing to create new user because of validation

无人久伴 提交于 2019-12-12 05:06:37
问题 I am loosely following Railscasts Simple OmniAuth http://railscasts.com/episodes/241-simple-omniauth to create my Twitter login. When I try to sign in and create a new user through twitter, I get the following message: Validation failed: Password can't be blank, Name is not valid., Email can't be blank, Email is not valid. If I hit the refresh button, I get the following error: OAuth::Unauthorized 401 Unauthorized I've already set my callback URL to http://127.0.0.1:3000/auth/twitter/callback

Rails 4.2 & Salesforce API with Restforce returning ActiveModel::ForbiddenAttributesError

爷,独闯天下 提交于 2019-12-12 04:48:48
问题 I'm trying to write a rails 4.2.0.beta2 app that will allow our organisation to interface directly with our salesforce instance. I've been following this really useful entry here. I'm nearly there, i've got my app setup in salesforce, it appears to be firing off the request ok, I can get to the login page and enter my inforamation. However I'm getting the following error upon callback. ActiveModel::ForbiddenAttributesError in SessionsController#create ActiveModel::ForbiddenAttributesError

How to read value from params array in omniauth-twitter

不羁岁月 提交于 2019-12-12 03:52:57
问题 I am saving my omniauth in auth variable as follows auth = request.env["omniauth.auth"] When I inspect it as follows puts auth.inspect It gives me #<OmniAuth::AuthHash credentials=#<OmniAuth::AuthHash secret="ouAWj4Hvb9qwKiDDd66ewI8Hq8pDHj8dtfgdlmvdeJDSxY8" token="136631281-Ruduz2BesDwNwcBlwCaV90H358LCA0rCfLonMCE9"> extra=#<OmniAuth::AuthHash access_token=#<OAuth::AccessToken:0x00000003f77968 @token="136631281-Ruduz2BesDwNwcBlwChghaV90H358LCA0rCfLonMCE9", @secret=

Achieving 100% test coverage in Rails Oauth using Rspec stubs and mocks

落爺英雄遲暮 提交于 2019-12-12 03:14:04
问题 I am trying to figure out a way to stub/mock the access token calls to provide coverage to methods called when a user's token has expired. The more guides I read on this issue the more I get confused. I do not want to call the external provider, and I want to confirm the methods report 100% coverage in case a developer modifies them and they work incorrectly. What should I add to the spec below to make it reach our testing goal of 100%? The load_json_fixture('omitted_oauth') brings in a JSON

Why is the twitter oauth access token invalid / expired (rails 3) [duplicate]

做~自己de王妃 提交于 2019-12-12 02:24:35
问题 This question already has answers here : Twitter::Error::Unauthorized in PostsController#create - Invalid or expired token (2 answers) Closed 6 years ago . I've been trying to solve this problem for the past three days but to no avail. All I'm looking to do is allow users who logged in using Twitter to tweet to their accounts. Here's the error message that I'm trying to resolve: Twitter::Error::Unauthorized in PostsController#create Invalid or expired token I've tried all sorts of different