如何将 google 身份验证数据推送到 mongodb?
How to push google authentication data to mongodb?
我按照 google 开发人员文档 https://developers.google.com/identity/sign-in/web/sign-in 并为我的站点创建了 google 登录。 下一个问题是如何将其放入我的数据库。我使用 mongodb.
Here's the link to my codepen which contains the auth code https://codepen.io/dingus45191/pen/yLaXZWW
您也可以使用“护照 js”:http://www.passportjs.org/packages/passport-google-oauth2/
此模块允许您在 Node.js 应用程序中使用 Google 进行身份验证。通过插入 Passport,Google 身份验证可以轻松且不显眼地集成到支持 Connect 风格中间件(包括 Express)的任何应用程序或框架中。
还有https://firebase.google.com/docs/auth
Firebase 身份验证提供后端服务、易于使用的 SDK 和现成的 UI 库来对您的应用程序的用户进行身份验证。它支持使用密码、phone 号码、Google、Facebook 和 Twitter 等流行的联合身份提供商等进行身份验证。
我按照 google 开发人员文档 https://developers.google.com/identity/sign-in/web/sign-in 并为我的站点创建了 google 登录。 下一个问题是如何将其放入我的数据库。我使用 mongodb.
Here's the link to my codepen which contains the auth code https://codepen.io/dingus45191/pen/yLaXZWW
您也可以使用“护照 js”:http://www.passportjs.org/packages/passport-google-oauth2/
此模块允许您在 Node.js 应用程序中使用 Google 进行身份验证。通过插入 Passport,Google 身份验证可以轻松且不显眼地集成到支持 Connect 风格中间件(包括 Express)的任何应用程序或框架中。
还有https://firebase.google.com/docs/auth Firebase 身份验证提供后端服务、易于使用的 SDK 和现成的 UI 库来对您的应用程序的用户进行身份验证。它支持使用密码、phone 号码、Google、Facebook 和 Twitter 等流行的联合身份提供商等进行身份验证。