Vue.js
async signInWithLinkedIn() {
console.log("Sign In Clicked!")
try {
const response = await CustomerProfileService.signInLinkedIn()
if(response.data.error != null){
this.error = 'Please try again.'
}else{
this.error = 'Successful.'
}
} catch (error) {
//this.error = error.response.data.error
}
}
Node.js
var Linkedin = require('node-linkedin')('aaaa', 'bbbb')
async signInLinkedIn (req, res) {
//var scope = ['r_basicprofile', 'r_emailaddress']
// This will ask for permisssions etc and redirect to callback url.
Linkedin.auth.setCallback('http://localhost:4172/linkedInCallBack')
//Linkedin.auth.authorize(res, scope)
Linkedin.auth.authorize(res)
}
我正在使用node-linkedin
包从用户那里获取一些LinkedIn数据。因此,当运行nodejs代码时,没有任何错误,但不会将我重定向到我将批准请求的登录页面。我怎样才能解决这个问题 ?先感谢您。