Nancy Selfhosting 和 google 身份验证

Nancy Selfhosting and google authentication

我找不到任何合适的样本 google(或 facebook)身份验证,以防将 Nancyfx 用作自托管程序。

需要建议。

抱歉,Nancyfx 没有官方 code/sdk。 但是如果你想在任何站点上支持基本的 "Sign in with Google",最简单的方法是在页面上添加一些代码(这可以让你得到一个 id_token) https://developers.google.com/identity/sign-in/web/

并将此 id_token 发送到您的服务器并在服务器端对其进行验证。验证代码相当简单。您可以从此处获取示例 python 或 java 代码。 https://developers.google.com/identity/sign-in/web/backend-auth

这可能是 Google 在基于 Web 的应用程序上登录的最简单方法。