Deezer API Redirect does Not Work on Localhost - api

I am trying to set up an OAUTH flow with python to connect to the Deezer API. I am using flask as my local server.
However when I try to connect as a user, I get the message You must enter a valid redirect URI and I am not redirected back to my localhost site. I have tried the following in the Deezer app settings, but nothing works!
Application Domain: 127.0.0.1:5000;
Redirect URL: http://127.0.0.1:5000/deez_authorized
Application Domain: localhost:5000;
Redirect URL: http://localhost:5000/deez_authorized
Application Domain: localhost;
Redirect URL: http://localhost:5000/deez_authorized
I have searched all related questions on stack overflow, but none have answered the issue. Surely you must be able to use localhost for development purposes no?

Related

Keycloak - Proxy / Front End Url / Javascript client redirect issue

I'm attempting to use Keycloak for some future projects and it's still very new to me so I'm plugging away reading through the docs and searching for issues online but I'm currently stumped on one thing - I have a vuejs app I’ve added as a client (127.0.0.1:3001), I have a reverse proxy setup in IIS (idp.mc.local) and then a docker container on Windows with keycloak running (127.0.0.1:8080), when I attempt to login, instead of being redirected back to the vuejs client I am just getting redirected to the root of the reverse proxy with the state value in the url, as in the network logs in the screenshot below:
Network logs showing incorrected 'Location' redirect
If I don’t set a front end url for the realm and bypass the proxy / hook my vuejs client to login via Keycloak directly on 127.0.0.1:8080, it redirects to 127.0.0.1:3001/#state… correctly, as below:
Network logs showing correct 'Location' redirect
I can't spot any way to sort this issue, I thought the front end url for the realm should state the proxy address? I can't see why Keycloak would redirect to it at the end of the login process rather than to my client app url, the redirect_uri is being ignored by keycloak and for some reason taking me back to the root of my proxy domain. If I actually manually visit 127.0.0.1:3001/#state… with the state value copied in from the incorrect redirect, I log in successfully.
It's baffling me and any help would be appreciated!
The answer did turn out to be an IIS related issue with the setup of Application Request Routing / ARR being the problem. What was needed was to edit the settings for IIS Application Request Routing and uncheck the option:
Reverse rewrite host in response headers as can be seen in the image below:
IIS ARR Checkbox to untick
Hopefully this will be helpful for someone else who might have the same issue at some point!

Google OAuth2 Error: redirect_uri_mismatch

My client is use other type
I have no idea why i get redirect_uri_mismatch error. It work on localhost but not on domain.
Client type other is for installed applications it should not have a redirect uri the way it works is it returns the authorization code directly back where it came from that being
localhost
127.0.0.1
urn:ietf:wg:oauth:2.0:oob
For some reason your code is sending a https redirect uri which is in correct it should not be doing this. It looks like you are using the code for a web browser application with a native application client.

hybridauth: redirect URI is not whitelisted in the app

i am configuring single sign on feature with hybridauth plugin. It took me 2 days setup this. However, i am getting redirect uri error with facebook and google.
In google and facebook i have given website name like this http://example.com
i didn't found anywhere to put redirect url.
Now when i click on facebook or google. I am getting below error.
URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings.
Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
Google error is below.
400. That’s an error.
Error: redirect_uri_mismatch
Login page exist on root and there is a folder i have created for hybridauth.
Inside that folder index.php file.
In config.php file. i have given baseurl like this.
"base_url" => "http://example.com/hybridauth/index.php",
I know this question doesn't have much code. But as per me issue with base_url and facebook/google oauth api.
You should be able to set Authorized redirect URIs on the provider's page. For example, on Google's Developer Console, you should be able to set the Authorized redirect URIs on the Credentials tab for your app:

Using a *.net domain as site URL or app domain

I'm trying to register an application so that I can implement log in with facebook on my site. The problem is that my domain ends with a .net hence I get an Error
App Domains: ****.net is not a valid domain.
Site URL is not a valid URL.
What could be the problem because when I use .com everything works fine.

Facebook apps on a domain with URL forwarding and masking

I'm developing a web application with Facebook Javascript SDK on my server at http://example.com/webapp/. Now I registered a new domain name, say domain.com, with no hosting, and I forwarded with URL masking domain.com to example.com/webapp/, so the web app is still on my server at example.com/webapp/. I've tried to change app settings on Facebook, site domain to domain.com and website URL to domain.com, but the Javascript SDK doesn't work!
I think that the problem is that requests to facebook comes from my server at example.com and the app domain is domain.com. I notice that the JS SDK uses window.location to retrieve the url to be matched with the app domain and website url.. Is there a way to inject the redirect_uri parameter on every JS SDK functions call with the url of my redirecting domain domain.com?
Thanks to all in advice!
Instead of using URL Masking / Forwarding, you should see if you can use your domain domain.com pointing straight to example.com/webapp using Add-on Domains.
I.e. create a virtual host and have the new domain link to the actual files on the old domain name. Fowarding isn't the best way as some forwards use iframes or javascript to redirect.