OAuth同意屏幕-删除应用程序徽标的能力:旧解决方案不再起作用 [英] OAuth consent screen - ability to remove application logo: old solution is no longer working

查看:124
本文介绍了OAuth同意屏幕-删除应用程序徽标的能力:旧解决方案不再起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:如何删除应用程序徽标.

Question: how to remove an application logo.

解决方案:此答案的先前解决方案 https://stackoverflow.com/a/57168008/1992004 ,不再工作.

Solution: previous solution from this answer, https://stackoverflow.com/a/57168008/1992004, is no longer working.

Google将"iconUrl"的格式更改为"icon",并且现在使用Base64编码的数据流(例如"icon":"iVBORw0KGgoAAAAN...),而不是以前写为"iconUrl":"https://..."的图像URL.

Google changed the format of "iconUrl" to "icon", and uses now the Base64-encoded data stream, like "icon":"iVBORw0KGgoAAAAN..., instead of the image URL, previously written as "iconUrl":"https://...".

我尝试了"icon":""和许多Base64编码的值,例如"icon":"IA""icon":"Lw"以及其他一些-没有成功.我收到类似控制台的消息

I've tried "icon":"" and many Base64-encoded values like "icon":"IA", "icon":"Lw", and some of other - no success. I get console messages like

对于"icon":""

{
  "error": {
    "code": 400,
    "message": "The request failed because one of the field of the resource is invalid.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "client_auth_config",
            "subject": "?error_code=9&error_field_name=UpdateIconRequest.icon&error_field_value=%3CByteString@3eeee81e+size%3D0+contents%3D%22%22%3E"
          }
        ]
      }
    ]
  }
}

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.identity.clientauthconfig.v1.ClientAuthConfigError",
        "code": "ICON_STORAGE_FAILURE"
      },
      {
        "@type": "type.googleapis.com/google.identity.clientauthconfig.v1.IconStorageError",
        "reason": "INVALID_IMAGE"
      }
    ]
  }
}

{
  "error": {
    "code": 400,
    "message": "Invalid value at 'icon' (TYPE_BYTES), Base64 decoding failed for \" \"",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "icon",
            "description": "Invalid value at 'icon' (TYPE_BYTES), Base64 decoding failed for \" \""
          }
        ]
      }
    ]
  }
}

有人知道,应该在此处插入什么以从应用程序中删除徽标图像?

Does somebody know, what should be inserted here to remove the logo image from the app?

推荐答案

答案:

不幸的是,没有办法做到这一点.

一旦上传了OAuth应用程序徽标,就不支持将其删除-这个问题是您链接完成此操作的方式有点棘手,检查网络请求并从通过UI发送的先前的JSON对象确实显示了这一点.

Once an OAuth Application Logo has been uploaded there isn't a supported way of removing it - in the question that you linked the way that this was done is a bit hacky, inspecting the network requests and building a new request from the previous JSON object sent via the UI really shows this.

由于图标URL已更改为需要Base-64编码的值,因此已弃用.很难说这是否是Google故意创建的,但是现在空值将始终返回INVALID_ARGUMENT. icon值中的任何数据也将仅替换图像数据,因此这不是可行的解决方法,就验证过程而言,图像数据存在,因此需要被验证.

As the icon URL has changed to need a Base-64 encoded value this has been deprecated. Whether this was intentional by Google or not is hard to say, but now an empty value will always return INVALID_ARGUMENT. Any data in the value for icon will also just replace the image data and so this isn't a viable workaround, as as far as the validation process goes, image data exists and so will need to be verified.

如果这不是一个艰巨的过程,那么这里唯一的解决方法是使用新的OAuth同意屏幕创建一个新的GCP项目,而无需上传图片.当然,您将需要重新激活所有相关的API,并将相关的脚本和项目链接到新的设置.

If it's not too much of a arduous process, the only workaround here is to create a new GCP project with a new OAuth consent screen without uploading an image. Of course, you will need to reactivate all the relevant APIs and link the relevant scripts and projects to the new set-up.

不过,您可以让Google知道这是一项重要功能,并且您希望要求他们实施. Google的问题跟踪器是供开发人员报告问题并为其开发服务提出功能要求的地方.我建议将功能请求模板用于 G Suite插件,因为这是可以使用GCP项目的组件.

You can however let Google know that this is a feature that is important and that you would like to request they implement it. Google's Issue Tracker is a place for developers to report issues and make feature requests for their development services. I would suggest using the feature request template for G Suite Add-ons as this is a component for which GCP Projects could be used.

我知道这通常是个坏消息,但我希望这对您有帮助!

I know this is generally bad news, but I hope this is helpful to you!

  • OAuth consent screen - ability to remove application logo [Obsolete]

这篇关于OAuth同意屏幕-删除应用程序徽标的能力:旧解决方案不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆