I have an application that works as the following:
- index.html loads index.js
- index.js looks for a token on local storage, doesn't find it and redirects to auth.php using
window.location.href = "auth.php";
- auth.php redirects to external-api.com using
header("Location: external-api.com/login");
- the user logs in on their platform, which redirects back to auth.php with a code using get request
- auth.php then makes a post to external-api.com with that code and a few more params, and receives a response with an actual access token
- auth.php redirects back to index.html using
header("Location: index.html?token=".$token);
However, is there a way to redirect back passing data without using query parameters?