Google OAuth2 for authentication redirect hangs - google-oauth

I've implemented a simple OAuth2 for Authentication login system that is working reliably on my dev server using a localhost redirect uri.
When testing from a production server, with updated redirect uri, the Google account permission interface opens up for the user logging in. After authorizing account access, the browser just hangs on "Waiting for accounts.google.com..." and doesn't go anywhere. At this point, I can see that the application has been granted access to my profile by viewing account permissions on my Google account dashboard.
If I change the redirect uri to an invalid one, I do get the invalid redirect uri Google error message back, so it looks like the redirection cannot reach my redirect uri. I can reach the reditect uri directly through a browser though. Any pointers?

Had a similar problem trying to create a "Login with Google" App. Since this was my first Google App, and I was also just first using the social networking setups in the software package which I bought BEFORE the Google API had changed, I was at a complete loss as where to start.
It finally dawned on me to redirect Google (via the App settings in the developer console) to a test web page on my site (instead of the page defined by the software package,) and all worked as expected, meaning Google redirected properly to the test page (which was actually just my root index.php). This told me that because the Google API had changed, my software package functionality was obsolete, and I needed to explore the code there.

Related

Invalid redirect with Google Drive and Sites

I developed a Google Drive API app and then wanted to put it on a Google Sites page, which I did by inserting its code into an "embed HTML" element on a new Sites web page I created. But, as soon as the code tries to initiate a user authorization login to Google, a redirect_uri_mismatch error 400 occurs with the offending url being origin=https://1538261391-atari-embeds.googleusercontent.com, which appears to be used by the Google code that was automatically inserted on the web page (not by me) to access font data for the page. Even though the Google instructions do not say anything about adding this domain to the uri redirect list, I tried adding it anyway in the Google Cloud Client ID Authorized Redirect setting, but anything .googleusercontent.com is forbidden there.
Can this be fixed, or am I wrong to even be trying to use the Drive API on a Sites web page? Note that I checked the stack overflow topic "Integrating Google Drive with Google Sites (intranet)" and it was unhelpful.

Login to Windows Authentication automatically

We have a program that runs in IIS with Windows authentication, and which is available to the outside world.
Right now, we provide to every interested party a link to the program, along with guest credentials they then have to type.
Is there a possibility to do away with the credentials? Our internal people should be able to login as usual, but we want to provide a link to get into the guest account without typing any login credentials.
I have tried to add the credentials into the clickable url, but Internet Explorer and Edge browser do not support this, and Mobile Safari throws phishing warnings.
Can this be done universally, that the authentication is done invisibly in the background in all browsers, using some kind of redirect or XHR call with arguments or something like that?

Oauth2 login times out on AWS

I'm currently developing a Flask application on a Amazon EC2 instance running Linux. I have installed httpd and access to the site is successful. The Flask application has an OAuth2 authentication using Google accounts.
When testing on localhost, the website runs perfectly with the user staying logged in. However, when testing on the live site - there is a redirect to the Google login page after about a minute. Apart from this, the live site is working as expected including the actual process of logging in.
Does anyone have any ideas why this is the case or have suggestions on how to fix this? I can provide more details on the setup if need be. It seems strange that the localhost doesn't have this issue.
Make sure you're using UTC everywhere.
Check:
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=[access_token]
to see the expiration time of your access token.

Jhipster social login via Google

I added clientID and clientSecret (created in Google Developer console) to application.yml but I couldn't get it working. Any idea what is causing error 400. Error: redirect_uri_mismatch. I got http://127.0.0.1:8080 in Authorized JavaScript origins.
I did everything what is said in Google's tutorial, but no luck:
https://developers.google.com/identity/sign-in/web/server-side-flow#step_1_create_a_client_id_and_client_secret
You need to specify in your Google developers console the different redirect url you authorize. For you, you need to add http://127.0.0.1:8080 url.
Little tuto:
Connect to your developer console, click one the main menu
Select API management
Go to Identifiant and select your application, here JHipster
And add your url and save
Another thing that I had to do that wasn't mentioned clearly in the google developer link was to enable the Google+ API.
The various API's are accessible via the Library tab under the Dashboard.

iis requests authentication when using a domain name on the local machine

I'm trying to develop a very simple asp.net web-forms site, using Yahoo! as an external identity provider. The user clicks on a link to Yahoo!, and after identifying on Yahoo! login page, Yahoo! redirect the user to the site with a token identifying the user as a URL parameter.
When I'm on localhost, it works fine. The problem is Yahoo redirects to a domain, which also points to my machine (it's actually a no-ip.org sub-domain). At this point, IE pops a message saying "The server at Default: admin/1234 requires a username and password". No password that I enter satisfies it, and the request is not reaching the application.
How do I get rid of this message, and let the request get throu to my application?
I'm pretty certain I don't have an "admin" user on the system.
The whole thing is just two pages, one with a link to Yahoo! and one landing page to which Yahoo! redirects. It's only purpose is to collect the token, for an unrelated library i'm working on.
I'm running on Win7 Home edition, with IIS 7.5, Visual Studio 2012 Web Express and .NET 4.5.
Thanks.