Google is updating their OpenID Connect implementation to be fully spec compliant, will anything break for me?

不羁岁月 提交于 2019-12-10 21:48:29

问题


Google updated their OpenID Connect endpoints to be fully spec compliant, as part of the OpenID Certification effort. I rely on OpenID Connect to sign my users in with Google. Will I need to do anything as a relying party to avoid breaking due to these changes?


回答1:


It depends on how you use OpenID Connect with Google. If you are performing dynamic discovery by fetching https://accounts.google.com/.well-known/openid-configuration as recommended by the docs then the way your servers interact with Google will change, but you will only be affected if your implementation cannot handle the newer, more spec compliant responses.

On the other hand, if you have hardcoded the various endpoints directly (i.e. the auth and token endpoints) then you are isolated from these changes, but you should consider migrating to the new endpoints.

Major changes in the new endpoints include:

  1. Id Token issuer (the iss claim) changes from accounts.google.com to https://accounts.google.com (during the migration peroid, you should accept either value)
  2. If your response_type includes id_token, you must include a nonce or your requests will hard-error.

If you are using a spec-compliant OpenID Connect library then theoretically everything should continue to work as before.

To avoid any possible problems during the migration period (or if your website suddenly breaks), you can hardcode the following URL to get the previous discovery document: https://google.com/accounts/o8/well-known-openid-configuration-old.json (or use the values within to hardcode your auth and token endpoints). As this document points to old versions of the endpoints, you will get the old behavior. Then you can test your products with the latest endpoints (as found in the current discovery document) at your leisure.

To compare the differences, or view the complete new & old, see this gist.



来源:https://stackoverflow.com/questions/29830503/google-is-updating-their-openid-connect-implementation-to-be-fully-spec-complian

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