On the server side I have implemented a working authentification via passport-steam. When I open the URL .../api/v1/connect/steam
it redirects me to the Steam Login page and when I succesfully log in, it redirects me back to returnURL
.
But now I want to connect it with my frontend and this is where I'm a bit lost. To access .../api/v1/connect/steam
I have to send an authorization header (Firebase Authentification) with Bearer <token>
. Otherwise I can't access the URL.
Unfortunately I can't send headers when using window.open
, so I don't know where I should start solving the problem. It comes to my mind that maybe I should do a GET
request with the authorization header and then return the OpenID URL (https://steamcommunity.com/openid/login?openid.mode=checkid_setup...
) but I haven't found a way to retrieve the URL.
It seems like there is also no way for me to access req
inside the SteamStrategy
callback.
Can someone guide me in the right direction?
Edit: So I found out I actually can access req
inside the strategy callback but that doesn't seem to help me either, since I need the OpenID URL as response and not get redirected to that URL.