Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在meteor中使用JWT令牌对用户进行身份验证,并在meteor.user()中获取用户的详细信息?_Meteor_Jwt_Single Sign On - Fatal编程技术网

如何在meteor中使用JWT令牌对用户进行身份验证,并在meteor.user()中获取用户的详细信息?

如何在meteor中使用JWT令牌对用户进行身份验证,并在meteor.user()中获取用户的详细信息?,meteor,jwt,single-sign-on,Meteor,Jwt,Single Sign On,我的应用程序为来自某个第三方应用程序的用户生成了JWT令牌 当我使用jwt.io解码它时,它会正确解码 我需要使用meteor登录令牌对meteor应用程序进行令牌身份验证 我的代码片段如下所示: Meteor.loginWithToken(token, (err) => { if(err){ console.log("loginwithtoken Err", err); }else{ console.log("Login successful");

我的应用程序为来自某个第三方应用程序的用户生成了JWT令牌

当我使用jwt.io解码它时,它会正确解码

我需要使用meteor登录令牌对meteor应用程序进行令牌身份验证

我的代码片段如下所示:

 Meteor.loginWithToken(token, (err) => {
   if(err){
     console.log("loginwithtoken Err", err);
   }else{
     console.log("Login successful");
     console.log("current user is ", Meteor.user());
   }
 });
我总是得到如下错误:


如何在这里登录用户,以便所有用户详细信息都可以在整个应用程序中的Meteor.user()中找到?我这样做对吗?

我的应用程序为用户生成了JWT令牌
您是如何生成令牌的?请添加代码<代码>我总是在这里出错。请添加错误,但不是作为屏幕截图,而是作为格式化文本/代码。
我的应用程序为用户生成了JWT令牌
您是如何生成令牌的?请添加代码<代码>我总是在这里遇到错误。请添加错误,但不是作为屏幕截图,而是作为格式化文本/代码。