我使用passport.js进行身份验证使用护照-google- Iam 20,
我想知道怎样才能得到像地址,电话号码这样的用户信息?到目前为止,我只能得到电子邮件,姓名,个人资料等信息,但没有地址和电话号码。如何在谷歌登录后访问用户数据地址?
是否有访问此用户地址和电话号码的API?我该怎么办?
这是我的密码:
护照设置
passport.use(
new GoogleStrategy({
//options for the google strategy
callbackURL: keys.origin.url + '/api/auth/go
首先,感谢您的回复。我尝试使用nodeJS创建REST API,我认为oAuth2是根据我的系统对用户进行身份验证的最佳方式。
用户存储在LDAP中,api密钥保存在MySQL引擎上。客户帐户代码也将存储在MySQL中。所有过程都正常,用户已通过身份验证,API令牌已保存在MySQL中,但当我尝试使用此令牌时,passport拒绝对我的请求进行身份验证并返回:
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:691:11)
我正在尝试使用谷歌应用程序电子邮件id的passport js。我可以使用gmail.com电子邮件id进行身份验证。但如果电子邮件id是google应用程序id (google.com/a/companyname.com),我如何进行身份验证。
这是我的代码
var express = require('express');
var app = express();
var passport = require('passport');
var GoogleStrategy = require('passport-google').Strate
我试图使用护照和谷歌护照将谷歌身份验证嵌入到Node.js中- google 20。问题是,当google回调路径打开时,我得到:
Error
at Strategy.OAuth2Strategy.parseErrorResponse (E:\Programowanie\NodeJS\Hydronide\node_modules\passport-oauth2\lib\strategy.js:329:12)
at Strategy.OAuth2Strategy._createOAuthError (E:\Programowanie\NodeJS\Hydronide\node_modules\p
我正在创建一个后端,依赖于快速和GraphQL,这将服务于客户端的应用程序(安卓和反应)。 我一直在关注这个article,了解如何在GraphQL中使用passport.js进行社交身份验证。 本文使用passport-google-token策略,并基于Apollo-server,但我个人更喜欢使用express-graphql。 在将我的android应用程序设置为使用google身份验证并尝试将突变发送到服务器后,我收到以下错误 Google info: { InternalOAuthError: failed to fetch user profile
at E:\_Pr
我试图使用谷歌身份验证护照对用户进行身份验证--但它一直在发送InternalOAuthError:未能获得请求令牌。
错误视图
在(/Users/menaka/WebstormProjects/cardCreaterServer/node_modules/passport-oauth1/lib/strategy.js:396:17) at /Users/menaka/WebstormProjects/cardCreaterServer/node_modules/passport-oauth1/lib/strategy.js:244:41 at /Users/menaka/WebstormP
我在我的一个应用程序中使用google plus API。它在我的本地存储库中工作得很好,但是在Heroku上,它抛出了这个错误: error: redirect_uri_mismatch 请求中的重定向URI http://discuss-my-anime.herokuapp.com/auth/google/redirect与授权给OAuth客户端的重定向URI不匹配。 我的google plus API凭证如下:Google plus API credentials 我使用passport包进行身份验证,我的passport设置代码如下: const passport = requi
我试图建立谷歌认证的网站运行在node.js,passport.js,快递和mongodb,主要基于。我已经设法使本地身份验证工作,但当试图使谷歌身份验证工作时,我得到了一个TypeError: OAuth2Strategy requires a verify callback错误时,试图初始化服务器。
Google的身份验证策略保存在/config/passport.js中,如下所示:
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy();
var User = require('
有没有人能让google nodejs-客户端成功地插入片刻?
无论我尝试什么,我都会得到一个通用的400个“无效值”错误,但是由于也不能工作,所以无法缩小无效值。
这是因为缺少数据请求可见性参数吗?我正在使用passport.js的require('passport-google-oauth').OAuth2Strategy来处理oauth访问,该部分运行良好,但我不知道如何将请求可见性合并到oauth请求流中,因为这肯定不是源自客户端表单。
下面是我要做的事情的一个片段(使用最新版本的googleapis,v1.0.2):
var google = require('