'Opnening a new tab in R, capture response, close the tab

so i am building a R shiny Application, that needs a kind of E-Signature, so i created all my saml encoding, decoding, and the saml requests are structured properly, but whenever i send them as GET requests using httr, it give me 401 status code, so instead i tried to force js to open a new tab and go to the url having the saml request, using the following code,

js_code <- "
shinyjs.Browse = function(url) {
window.open(url,'_blank');
}
"

And then calling js$Browse(My_Saml_URL)

and it works fine, but I cannot capture the SAML response, as the request is not send from my backend, So is there any way i can send a request like a browser, would Rselenium work in that case?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source