Revadike Posted April 13, 2017 Report Share Posted April 13, 2017 Say, I'd like to login to this website using Steam via NodeJS. How do I go about doing that? I tried a dirty solution, but it doesn't redirect me to the third party website callback url. community.httpRequestGet(url, {}, function(error, response, data) { var url = $("#openidForm", data).attr("action"); var formdata = $("#openidForm", data).serializeObject(); community.httpRequestPost(url, formdata, function(error, response, data) { console.log(error, response.statusCode); console.dir(response.headers) }); }); Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 13, 2017 Report Share Posted April 13, 2017 Try specifying followAllRedirects = true. Request won't follow redirects for non-GET methods otherwise. Quote Link to comment Share on other sites More sharing options...
Revadike Posted April 13, 2017 Author Report Share Posted April 13, 2017 Try specifying followAllRedirects = true. Request won't follow redirects for non-GET methods otherwise. I thought I tried that already, but now it works! Now I have: var url = $("#openidForm", data).attr("action"); var formdata = $("#openidForm", data).serializeObject(); community.httpRequestPost(url, { followAllRedirects: true, formData: formdata }, function(error, response, data) { ... } Quote Link to comment Share on other sites More sharing options...
Revadike Posted April 13, 2017 Author Report Share Posted April 13, 2017 (edited) I can't seem to get the cookies/session of the logged in site.Can I somehow set request = request.defaults({jar: true}); for httpRequestPost? Nevermind, I was able to get the PHPSESSION cookie via response.request.headers.cookie Edited April 13, 2017 by Royalgamer06 Quote Link to comment Share on other sites More sharing options...
someone Posted October 27 Report Share Posted October 27 Is this algorithm still relevant? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.