feat: working user auth on deployment #1

Merged
ethanf merged 6 commits from feature into main 2024-11-09 16:45:10 +00:00
Showing only changes of commit f13d1557fb - Show all commits

View File

@ -43,7 +43,7 @@ export interface SteamUser {
export const Steam = new SteamAuth({
realm: `http://${hostname}:${port}`,
returnUrl: `https://${deployHostname}${authPath}/return`,
returnUrl: `https://${hostname}:${port}${authPath}/return`,
apiKey: Deno.env.get("STEAM_API_KEY"),
});
@ -61,7 +61,7 @@ router.get(`${authPath}/return`, async (ctx) => {
const user = await Steam.authenticate(ctx) as SteamUser;
ctx.state.session.set("steamid", user.steamid);
ctx.state.session.set("user", user);
ctx.response.redirect(`http://localhost:5173/signedIn`);
ctx.response.redirect(`https://${deployHostname}/signedIn`);
} catch (e) {
ctx.response.body = `Error: ${e}`;
}