Closed stevenirby closed 10 years ago
I'm now getting a 403 when tinderbot tries to authorize.
<html> <head><title>403 Forbidden</title></head> <body bgcolor="white"> <center><h1>403 Forbidden</h1></center> <hr><center>openresty/1.5.8.1</center> </body> </html>
Also, no error is getting thrown because body is just the html and there is no error property.
this.authorize = function(fbToken, fbId, callback) { tinderPost('auth', { facebook_token: fbToken, facebook_id: fbId }, function(error, res, body) { if (!error && body.token) { xAuthToken = body.token; _this.userId = body.user._id; callback(); } else if (body.error){ throw "Failed to authenticate: " + body.error } }); };
I'm not really sure what's going on, but an error should probably be thrown, that the authorization didn't succeed.
I opened a pull req in tinderjs for this. Looks like it just needs more info in the header.
https://github.com/alkawryk/tinderjs/pull/6
Just merged https://github.com/alkawryk/tinderjs/pull/6 . Thanks!
I'm now getting a 403 when tinderbot tries to authorize.
Also, no error is getting thrown because body is just the html and there is no error property.
I'm not really sure what's going on, but an error should probably be thrown, that the authorization didn't succeed.