检索Google客户端ID和客户端秘密Azure身份验证



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

这是我在ASP.NET Core中为我的应用程序秘密所做的工作...

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

如果要在Azure WebApp上托管的

可以使用应用程序设置(基本上是环境变量)来存储该数据。在这里看看:https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-configure#application-settings

最新更新