Changed domain error - OpenId auth request contains an unregistered domain

Deadly 提交于 2019-11-28 18:16:12
Altryne

According to this page, Google closed registration to new OpenID 2.0 clients in May 2014 and will be shutting down the OpenID 2.0 service in April 2015.

The reason why some hosts work and some don't is that although Google isn't adding new hosts, you can still use the ones that are already registered.

UPDATE : Some people have asked for a simple explanation for how to fix this, or otherwise how to proceed.

Basically, you now have 2 options.

Use OAuth 2.0 (instead of openID protocols and older versions of OAuth)

or

Use Google+ login (which Google tried to "push" you towards)

For more details check the migration guide :

https://developers.google.com/+/api/auth-migration#userinfo

Miguel Andres

I would like to add some context to this thread together with a potential solution to developers that are currently blocked.

Back in February we announced the deprecation of OpenID 2.0 (OID2) scheduled for April 2015. We also announced that new OID2 relying parties (RPs) registrations will no longer be accepted after April 2014.

Given that the API will be shut-down in less than a year’s time, our intention is to avoid having new RPs integrating with Google's OID2 API. Instead, we suggest to use our OpenID Connect API which we consider more secure and easier to implement.

Registrations were effectively closed on May 19th (as documented in the Google’s OID2 developer documentation). All RPs already using OID2 should not be affected by this the closure.

As for developers currently working on an integration with our OID2 API (presumably because they missed the announcement and warnings in our OID2 documentation), we will do our best to minimize the friction caused by the registration closure. If you are in such situation, please let us know by posting a registration request before June 15th. The post should contain a sample OID2 request used by your application, in case you prefer not to disclose such information, please post an email address and we will reach out. We plan to look into each case and try to get you unblocked in the best possible way.


OID2 does not have a registration procedure for RPs integrating with an identity provider. RPs are associated to the realm value (e.g., www.example.com) used when contacting Google OID2 API. Thus, a RP is considered "registered" if its realm value has been used to contact our OID2 API.

You can easily change to OAuth 2, this article shows you how to register your app with Google and add the key to MVC. Scroll down to: "Creating a Google app for OAuth 2 and connecting the app to the project."

And you may need to add the Microsoft.Owin.Security.Google package via NuGet.

Dev

I had the identical problem but when using nodejs / expressjs

I have migrate my code using below url code and fixed that issue

Passport strategies for authenticating with Google using OAuth 1.0a and OAuth 2.0. https://github.com/jaredhanson/passport-google-oauth

The sub-domains that fail are those that had never seen any user requests before. As per https://developers.google.com/+/api/auth-migration#timetable, Google is not allowing new domains in the OpenID2 API.

I have this exact problem, we use googles login to run a platform, its a brand new problem.

A few things I have discovered if this helps

  1. Full domains trying to use openID never fail www.example.org and www.example2.com are not having this problem
  2. Subdomains on the platform have this problem sometimes, but the same subdomains always fail and the others always work.

It started around Monday and is still happening now.

Take a deep breath and just change Startup.Auth.cs file

            app.UseGoogleAuthentication();

to

    app.UseGoogleAuthentication(
     clientId: "000-000.apps.googleusercontent.com",
     clientSecret: "00000000000");

refer to the http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!