I have an electron application that authenticates through Steamworks with Steamworks.js. I want to pass this authentication to Appwrite somehow.
My thought was to use the Steam session token and pass it to Appwrite as a JWT token
appwrite.account.createJWT({ authTicket })
and then also double check the authentication via the steam API for extra security
const { data } = await axios.get('https://partner.steam-api.com/ISteamUserAuth/AuthenticateUserTicket/v1', {
params: {
appid: parseInt(process.env.STEAM_APP_ID ?? '0'),
key: process.env.STEAM_WEBAPI_KEY,
ticket,
},
});
if (!(data?.response?.params?.steamid ?? '').length) {
throw new Error('no steamid found');
}
Would something like this work? If not, is there a way I can authenticate someone with the steam session token or steam user ID?
Recommended threads
- Issue with Authentication
I am stuck with authentication using appwrite. I am getting bad request 400 error when trying to register though we already have project, database, collection c...
- JWT vs session (nodejs)
What is the difference between using JWT and the session secret? I thought you could validate the JWT without a request to the server, so I implemented it but r...
- LocalStorage fallback OAuth with Google ...
In https://appwrite.io/docs/advanced/platform/custom-domains When I check the localStorege, there is no data available for the account.