【问题标题】:Retrieve Google Client ID and Client Secret Azure Authentication检索 Google 客户端 ID 和客户端密码 Azure 身份验证
【发布时间】:2016-12-26 20:20:55
【问题描述】:

我显然不想硬编码这些值,但我不确定如何在 Azure 中获取存储的值。

这就是我在本地为我在 ASP.NET Core 中的应用程序机密所做的事情......

app.UseGoogleAuthentication(new GoogleOptions()
{
    ClientId = Configuration["Authentication:Google:ClientId"],
    ClientSecret = Configuration["Authentication:Google:ClientSecret"]
});

【问题讨论】:

    标签: azure authentication asp.net-core-mvc


    【解决方案1】:

    如果您要在 Azure WebApps 上托管这些数据,您可以使用应用程序设置(它们基本上是环境变量)来存储该数据。看看这里: https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-configure#application-settings

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-10
      • 2021-10-29
      • 2018-06-21
      • 2012-11-04
      相关资源
      最近更新 更多