Meteor-松弛oAuth2 Accounts.LoginCancelledError
我在Meteor应用程序Slack包中使用:acemtp:accounts Slack,并使用Slack按钮登录。不幸的是,我收到一个错误,无法登录。控制台中出现以下错误:Meteor-松弛oAuth2 Accounts.LoginCancelledError,meteor,oauth,slack,accounts,Meteor,Oauth,Slack,Accounts,我在Meteor应用程序Slack包中使用:acemtp:accounts Slack,并使用Slack按钮登录。不幸的是,我收到一个错误,无法登录。控制台中出现以下错误: "No matching login attempt found", errorType: "Accounts.LoginCancelledError" 按钮将我重定向到以下链接: 响应是:找不到404文件 我已经在Slack应用程序中添加了以下重定向URL: 不幸的是,它不起作用。我不知道发生了什么事。它一周前还在工作
"No matching login attempt found",
errorType: "Accounts.LoginCancelledError"
按钮将我重定向到以下链接:
响应是:找不到404文件
我已经在Slack应用程序中添加了以下重定向URL:
不幸的是,它不起作用。我不知道发生了什么事。它一周前还在工作,昨天停了。用户无法登录
这是我的loginWithSlack方法:
Meteor.loginWithSlack({requestPermissions: ["identity.basic", "identity.email", "identity.avatar"]}, (error) => {
if (error) {
$notification({
type: 'error',
title: 'Signup with slack error',
message: error.error ? error.error.message : JSON.stringify(error)
});
console.log(error);
slackLog.error(error);
} else {
this.$router.push({name: 'home'})
Meteor.call('loginSlackUpdate', (error) => {
if (error) {
$notification({
type:'warning',
title: "Error activating account",
message: error.error ? error.error.message : JSON.stringify(error)
});
slackLog.error(error);
}
});
}
});
Slack不再接受重定向uri中的“?”作为有效字符。在配置Slack服务时(在服务器端应用程序代码中),您可以通过配置
loginStyle
属性来删除它:
链接如下:
有关更多详细信息,您也可以查看此问题:
希望这有帮助 谢谢你的帮助。这就是它失败的原因。
ServiceConfiguration.configurations.upsert(
{ service: 'slack' },
{
$set: {
loginStyle: "redirect",
clientId: "1292962797", // See table below for correct property name!
secret: "75a730b58f5691de5522789070c319bc"
}
}
);