用于创建Google-cloud oAuth客户端的CLI / SDK

问题描述 投票:0回答:1

是否可以使用脚本(gcloud或任何库)创建OAuth客户端(https://developers.google.com/identity/protocols/OAuth2)?

Google推荐的方法(https://developers.google.com/identity/protocols/OAuth2WebServer#creatingcred)是从https://console.developers.google.com/apis/credentials手动创建。

我有多个具有不同url_redirects的应用程序,例如https://a.domain.comhttps://b.domain.com https://c.domain.comhttps://d.domain.com,此子域列表很大,可以手动管理。

我想为我的用例自动化此过程。我找不到任何可以做到这一点的图书馆。

更新: GCP控制台https://clientauthconfig.clients6.google.com/v1/clients使用的端点,并且也具有相关的权限“ clientauthconfig.clients.create”,但没有为此提供任何API。

google-cloud-platform google-oauth2
1个回答
0
投票

无论如何,您都需要API客户端来创建新的API客户端。您真的有必要以这种方式创建它吗?您可以只使用一个API客户端为应用程序创建多个“用户”凭据。

© www.soinside.com 2019 - 2024. All rights reserved.