After following this link on how to setup omniauth using google in a rails app, I noticed that the call back url was different from what I supplied in the google api console.
My question however is that, why is the call back url that I provided in the google API console different from the call back that google is redirecting to my app
FYI - I have the gem 'omniauth-google-oauth2' in my Gemfile
Related
Hi I'm beginner programmer
I'm trying to use instagram's realtime Photo Updates api
My purpose is use this API CONSOLE's subscription method
https://apigee.com/console/instagram
But I can't understand and handle callback url
What is the callback url's function?
And How can I implement the callback url?
The "callback url" (also referred to as redirect_url), is the URL Instagram will send users to after they have logged into Instagram, and authorized your application to read their data.
This is part of the OAuth 2 Spec, which Instagram (and many others) use to control access to their API.
The short version of the OAuth 2 "flow" is this:
You send a user to Instagram's page with your application ID, and a redirect URL.
The user logs into Instagram on their page and authorizes your application.
Instagram will then send the user back to your application (using the redirect URL value), along with a token that you can use to access their data.
GitHub has an excellent guide to how OAuth works on their server, which you will find very similar to Instagram's.
So the "callback url" should be set to the URL of your application server. For example, http://myapp.com/auth. Or, if you are working locally, you would use http://localhost:3000/auth.
Note: With Instagram (as well as most other APIs), the callback URL is permanently set when you register your client. So you'll often have to create separate clients for your live server, and your local one.
I am using twitter gem 4.8.1 http://rdoc.info/gems/twitter
It will not send stuff locally for some reason (all credentials the same and set up) saying "unable to verify your credentials" ... when the code is pushed to Heroku though it tweets with no problem.
Any reason for this? Would be nice to test out stuff locally with the gem.
Thanks!
Usually sites like Twitter or Facebook require that you register the domain you will use when publishing. If you registered www.mydomain.com with Twitter, that is the only domain it will accept connections from.
So you will need your Tweets to come from the website you entered here:
https://dev.twitter.com/apps/new
I have a mobile web application that integrates with the Facebook Graph API.
Basically, it uses the JS SDK to obtain details about the viewing user that it can then use to render user specific content.
I use the FB.login function to have the user login to my Facebook app. This should work as follows:
JS on pages detects that user has not logged in to Facebook app
User is given button to click to fire FB.login
User is redirected to Facebook page to authorise the app and login
User is redirected back to my mobile web application
JS on pages detects that user is logged in to Facebook app, polls user data from Graph and renders it.
This all works fine on Android, but the redirect step does not work on Mobile Safari
The user gets an error referring to an EntityRef, which looks like the Content-type being sent to the browser is XML but where the content includes an illegal character:
Error on line 1 at column 49: EntityRef: expecting ';'
This is the actual link that is generating the error:
https://m.facebook.com/dialog/oauth?display=touch&domain=cgfoodscomp.herokuapp.com&scope=email&e2e=%7B%7D&app_id=135937919902029&locale=en_US&sdk=joey&client_id=135937919902029&redirect_uri=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D24%23cb%3Df3cf8ca2ac%26origin%3Dhttps%253A%252F%252Fcgfoodscomp.herokuapp.com%252Ff2d1c54b04%26domain%3Dcgfoodscomp.herokuapp.com%26relation%3Dopener%26frame%3Df35f8ac348&origin=2&response_type=token%2Csigned_request
When you open this in another browser, you get a response with Javascript (I won't post it here as it contains script tags), which contains references to the iPhone:
iPhone.*Version/(5|6)
I'm actually using a Version 4 IOS.
Does anyone know if this stuff is supposed to work in Version 4?
This is a Facebook Bug, which is due for resolution:
https://developers.facebook.com/bugs/339889299473431
my first post after years of reading :P
I think that are some problem with the page of soundcloud https://soundcloud.com/popup_callback.html
My app uses the soundcloud api and work fine, but when my users try to connect with facebook and they are go from facebook to
https://soundcloud.com/popup_callback.html?returnTo=CALLBACK_URL
but it is not redirected to the callback url, only show a empty page.
Users need login in soundcloud in other window before to make login in my app.
Can be a problem my callback url? "http://domain.com/callback/"
I try it in ff, opera and chrome and diferents at S.O.
This seems to be a bug in the SoundCloud API (see Soundcloud: blank page with popup_callback.html when trying to auth using Facebook)
I was able to work around this by including display=popup in the querystring when redirecting to SoundCloud's OAuth2 authorization endpoint: https://soundcloud.com/connect?client_id=[my_client_id]&redirect_uri=[my_redirect_uri]&response_type=code&display=popup. This will force the mobile optimized display to show up, but fixes the Facebook login issue.
Note that I'm not actually opening a popup window, I'm just including this param when doing a client-side redirect using window.location='https://soundcloud.com/connect?...&display=popup'
I'm following the rails 3 guide to create a shopify app using oauth2 to authenticate, but once I try to install the app in a test shop I get this error.
{"error":"invalid_request","error_description":"The redirect_uri and application url must have matching hosts"}
That error means that the application URL you set in your app settings and the redirect URL you passed in your OAuth request are for different domains. Go check your app settings as well as the Omniauth setup file and make sure they're set up correctly.