Refactor authentication and implement password reset.
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@ -22,9 +22,9 @@
|
||||
import type {Player} from "@type/data.ts";
|
||||
import {l} from "@utils/util.ts";
|
||||
import Statistics from "./Statistics.svelte";
|
||||
import {authRepo} from "@repo/auth.ts";
|
||||
import {tokenStore} from "@repo/repo.ts";
|
||||
import {authV2Repo} from "@repo/authv2.ts";
|
||||
import Card from "@components/Card.svelte";
|
||||
import {navigate} from "astro:transitions/client";
|
||||
|
||||
interface Props {
|
||||
user: Player;
|
||||
@ -33,9 +33,8 @@
|
||||
let { user }: Props = $props();
|
||||
|
||||
async function logout() {
|
||||
await $authRepo.logout()
|
||||
tokenStore.set("")
|
||||
window.location.href = l("/login")
|
||||
await $authV2Repo.logout();
|
||||
await navigate(l("/login"));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user