When I do a post to a backend service and get a 307 in my response, I'm doing a res.redirect('/')
. Instead of doing that, can I redirect to a URL that belongs to a completely different site as well as post a form submit to that URL? I want to send values for SAML and RelayState. I currently have this login in my frontEnd by temporarily adding into the DOM a hidden form with two inputs. One for SAML and one for RelayState. Would it be possible to take that out of the frontend and have it done completely in the backend?
If i'm understanding this thread correctly, I'd like to do something like this but be able to dynamically fill in values for the inputs. The index.html example in this thread is essentially what i'm doing on the fly on my frontend: How to redirect to another page after serving a post request in Node.js?
EDIT:
Nevermind, I will do the submit on the frontend. When the other service returns a redirect, nothing will happen if I'm on my backend.