Closed adenta closed 8 years ago
There are a few things that could be causing an error, the most common one I see is when the redirect_uri isn't an exact match though.
The reason you're not seeing the full error is because you need to catch it at the end of the promise chain. So if you were to do:
cronofy.requestAccessToken(options)
.then(function(response){
console.log(response);
res.json(response);
}).catch(console.log);
You should be able to read it in your terminal and get a better idea of where it's going wrong. Alternatively you can use the method with a callback function that has an error as the first argument if you're more comfortable with callbacks, for example:
cronofy.requestAccessToken(options, function(err, res){
if(err) {
console.log(err)
}
res.json(response);
})
Let me know if that helps at all!
I'm going to go ahead and close this one since I haven't heard anything back and I'm unable to find any bugs locally. However don't hesitate to open another issue or reach out if you run into any more problems!
Whenever I try to get an auth token, I am seeing this error.
Is this common? What might be causing me to not be able to authenticate a user?
Code: (with the id and secret from the cronofy website replaced with placeholders.)
});