0

I've been tasked with setting up a redirect page on a classic ASP site that needs to send the user to our Angular app. The Angular app uses JWT's for authentication.

Originally we thought we'd make a form and submit its necessary information (the JWT token) via POST. But apparently Angular doesn't want a POST. But I don't want to put the token in a query string, either.

What other options have we?

POST doesn't seem to be an option. Local storage and session storage don't seem to be options, since the app is on a different domain. I can't figure out how to create & use a request with an authorization header in classic ASP.

Someone suggested POSTing to the app's backend, which I can do, but I don't know where to take it from there. Any suggestions or thoughts?

halfer
  • 19,824
  • 17
  • 99
  • 186
Alex
  • 81
  • 1
  • 5
  • 3
    Does this answer your question? [How can I post data using cURL in asp classic?](https://stackoverflow.com/questions/37462580/how-can-i-post-data-using-curl-in-asp-classic) *(not URL, but gives examples of how to interact via XHR in Classic ASP)*. – user692942 Mar 24 '20 at 12:56

1 Answers1

0

POST/GET to the app's backend can be done with MSXML6.ServerXMLHTTP

<%
Set x = CreateObject("MSXML6.ServerXMLHTTP")
x.open "GET", "https://...", false
x.send 
Response.Write x.responseText
Set x = Nothing
%>
user2316116
  • 6,726
  • 1
  • 21
  • 35
  • 1
    MSXML6 should be your first choice - see this article: https://stackoverflow.com/questions/951804/which-version-of-msxml-should-i-use – silver Mar 24 '20 at 03:45