Google APIs credentials - Authorized redirect URIs - api

My god. need help on this. Can anybody tell me why is that Google does not allow public IP address for 'Authorized redirect URIs'?
"Cannot be a public IP address"

You can give your project url for authorization url.

Related

Keycloak ignoring redirect_uri

We are implementing the SSO via the Keycloak. When an user wants to access our resources on desiredUri, he is automatically redirected to the keycloak login page{keycloakServerHostname}/auth/realms/{realmName}/protocol/openid-connect/auth?response_type=code&login=true&scope=openid&state={uuidOfStateForCSRF}&client_id={clientName}&**redirect_uri**={**desiredUri**}.
Then a login form is presented, but when I fill in the credentials and the POST call submitting the request is issued on Keycloa, the response from Keycloak is 302 FOUND, but the Location header does not contain my desiredUri+paramsForGettingTokens, but consists of keycloakServerHostname+paramsForGettingTokens instead.
The weird thing is when I manually put i.e. google.com to redirect_uri param, it works and the location header points to google.com, but as soon as I put there localhost, some IP etc. (not resolvable by a public DNS), it stops working and starts to ignore the redirect uri.
It looks like the Keycloak is validating the redirect uri with some kind of DNS lookup and when it cannot resolve that DNS, it puts the baseUrl of Keycloak there instead.
How can I turn off this behavior?
My client settings are as simple as they can be:
Keycloak settings screenshot
Thanks for any advice.

Google Authorized redirect URIs format

I am trying to integrate Google authentication with my ASP.Net core application. I have successfully integrated the appliation with Google authentication, after the login google redirects back to the home page of the application. I however would like it to redirect to https://localhost:44303/Home/dashboard.
To fix this, I have changed the "Authorized redirect URIs" from https://localhost:44303/signin-google to https://localhost:44303/Home/dashboard, but when i do that I get a redirect_uri_mismatch error. Is there a particular "Authorized redirect URIs" format that i need to follow? I checked the documentation at https://developers.google.com/identity/protocols/OAuth2WebServer but perhaps I am missing something very obvious.
OAuth Consent screen: I cannot add localhost in the "authorized domains" textbox.
OAuth Client Restrictions: If I add https://localhost:44303/Home/dashboard in the authorized redirect url's then I get a redirect_uri_mismatch error.
Stack Trace:
Error: redirect_uri_mismatch
The redirect URI in the request, https://localhost:44303/signin-google, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/685730099587-d2rac5lt7981tjkoo5td23ogm2q1at20.apps.googleusercontent.com?project=685730099587
Learn more
Request Details
response_type=code
client_id=685730099587-d2rac5lt7981tjkoo5td23ogm2q1at20.apps.googleusercontent.com
redirect_uri=https://localhost:44303/signin-google
scope=openid profile email
state=CfDJ8HG_FpcxsWVNk9Pwwx_Fh6NNjkmrebqlP7rA3Y3u0fx42o-r6KMmiNmbmC2vjIuZLqmTZMA8O8AfMgIxXO8Tj9k3x2PLe6wNyL7xqOXi6Yj-AJUmeZFwievUqEAuCKHClYJOFPAlKTxrnYIYCXoJjvwg8BM4JBKA_NgFGjy_CbGHrI2kyUC63Z7INhYHdwEyO13AsBfYXR4LfxAGf3jz3x8-ZKDUDgFOqYYKXXcDHt2VqlERXOVXdEqNUcxUtfhM
Just run into the same problem!
Just add to the Authorized Redirect URL:
https://localhost
Without any port or additional thing!
The message
The redirect URI in the request,
https://localhost:44303/signin-google, does not match the ones
authorized for the OAuth client. To update the authorized redirect
URIs, visit:
https://console.developers.google.com/apis/credentials/oauthclient/685730099587-d2rac5lt7981tjkoo5td23ogm2q1at20.apps.googleusercontent.com?project=685730099587
tells you pretty much all you need to know. Note that you can configure multiple redirect URLs to deal with every permuatation of test, stage and production servers. Just make sure that the redirect URL your app uses is an exact string match to one of the configured URLs.

Sharepoint URL redirection

I am trying to achieve URL redirection i want to know different possibilities to achieve this.
Scenario: I have created sharepoint web application(2013, host header site collection) with Annonymous access enabled and NTLM(windows authentication enabled--- Both are enabled). I have bind this site to certificate also and its working as expected if i browse the site with https://test.com
but if i just browse the site with http://test.com its asking me for user name and password. This i want to avoid even if i try to access http my requirement is it should redirect to https.
I have entered username and password and returns 200 http status.
I know there are options we can achieve this
1) IIS redirect
2) Through custom code snippet (C#/Javascript)
But apart from this is there any way we can achieve this like load balance or DNS etc
Your guidence will be really help full.
Regards
Sri
I think you can achieve this by addin an AAM (Alternate Access Mapping) setting in a sharepoint site.
Try to convert an Https request to the http in that. I haven't tried it myself so I am not sure if this will work or not, but there are some examples of a reverse which you want.
For your reference this is a link to make it for http to https
https://sharepoint.stackexchange.com/questions/64484/http-to-https-redirection-using-aam
Let me know the outcome.

Permission denied to generate login hint for target domain for Goole Plus login on web

I am using public ip address example : mypublicdomain.com
I have not set any redirect url on developer console.
It works fine for when i do it on localhost. It is not working on public ip address.
Please help
Add http://mypublicdomain.com and https://mypublicdomain.com to your redirect uris AND allowed javascript origins - that should fix it.

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: