'Need help redirecting with a bearer token

I'm trying to redirect from one webpage to another, but the other webpage is on a separate domain. Our two companies have a business relationship and I'd like to use their auth bearer token in the redirected http request for authentication with my backend service.

How do I do that? AFAIK, you can't set the header in elements, nor can you set them with window.open or window.location. I would need a way to effectively redirect from the affiliate website to my own, while passing the bearer token because I plan to use that token for authentication within the backend services that my website will call. I don't think I can use a cookie because cookies aren't cross domain.

How would I accomplish this?



Sources

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

Source: Stack Overflow

Solution Source