'Steam OpenId realm and returnUrl
I'm working on an application which use node-steam-openid.
I import it like this const SteamAuth = require("node-steam-openid");
When i create the SteamAuth object, 3 params are require realm, returnUrl and apiKey:
const steam = new SteamAuth({
realm: "https://example.net", // Site name displayed to users on logon
returnUrl: "https://rest_site.net/test/api/auth/steam/authenticate", // Your return route
apiKey: apiKey // Steam API key
});
In this case returnUrl is an API call that triggers my function in the backend that actually retrieves the user data and save the steamId in database.
The issue is that once opened the steam auth and insert the credentials, it gives me a generic error
The first thing that came to my mind is that returnUrl must not be an API call, so i change the SteamAuth object params:
const steam = new SteamAuth({
realm: "https://example.net", // Site name displayed to users on logon
returnUrl: "https://example.net/test_auth", // Your return route
apiKey: apiKey // Steam API key
});
With this new params, after steam authentication success, i'm being redirect (correctly) to https://example.net/test_auth
I wonder why I can't insert an API call as return route after steam authentication success
Solution 1:[1]
I think that your problem there was that your returnURL wasn't in the same realm that you specified.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gustavo Cunha |
