HTTP request node not following 302 redirect

Hi,

Im a newbie to node-red and this forum, so if anything in this post sounds stupid or the post itself placed wrong, im sorry for wasting your time.

annyway my problem:

Im trying to to a post redirect to gain wunderlist access, as described here :

https://developer.wunderlist.com/documentation/concepts/authorization

For a start I have hardcoded the url in the request node as:

Method : post
URL : https://www.wunderlist.com/oauth/authorize?client_id=ID&redirect_uri=URL&state=RANDOM (where ID and URL have been replaced )
Return : UTF-8 String

If I try the url in a browser everything works (redirected to the url + a code in the url), but in node-red it gives me an httpcode 302 + the hardcoded url as the responseurl ??

I have tried to change this.followAllRedirects = false to this.followAllRedirects = true in redirect.js in the request module, but that did not work.

Any ideas on what im doing wrong?

“ The Wunderlist API uses OAuth2

Have you seen the examples in the
node-red-contrib-oauth2 node?

yes, I installed the mentioned node earlier, but I could not figure it out, so I proceeded the "low-leveled way" instead with the http request node. But if this node can't process redirect, then im back to the Oauth2 node again.

a simple flow this this solution would then be the following:

inject node => function node => oauth2 node => debug node

where all the parameters is set on the msg object in the function node, - right ?

Sorry, I've reread your initial post and I can't see where you mention the oauth node

The readme of the Oauth2 node includes a full worked example of a HTTP Request with basic authentication, which you can import.

didn't mentioned it before, you are right. will try to import the example and see where it leads me. Thank you for your help :+1:

small update:

tried importing the oauth2 flow examples, - and the first example is nearly identical to what i have been building ( trigger node and then a request node calling an https endpoint with client id and a redirect url ). The example use an http url (not https)....

been googling further, and it seems im not the only one with problem regarding POST HTTPS request not redirecting :

seems I am stuck again, - will follow the github issue and see if something later on turns up :neutral_face: