So I am trying to grab a code that that appears in the URL when I redirect to a certain page. So I use something like window.location.href = URL. The issue is I have to do 2 redirects but the last one is the most important one because it routes to the page I want after I get the code from the first URL. So how do I grab the code from the first URL that it gives me without having to redirect?
When I redirect to a new page (AWS) what happens you can't run the rest of your javascript. The thing is I need to do 2 redirects. One to get the code in the the URL string that AWS gives me when I complete the redirect and another to take that code and generate a token using that code and redirect to the correct URL. But I can't do 2 redirects in a javascript function.
Login page --> need code from aws url after redirect --> redirect into my app after getting code from aws url