Remove reset password functionality
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-02-23 17:23:45 +01:00
parent 1433784369
commit b53ce04a75
4 changed files with 3 additions and 111 deletions

View File

@@ -51,7 +51,7 @@ export class AuthV2Repo {
}
try {
const login = await this.request("/auth/state", {
const login = await this.request("/auth", {
method: "POST",
body: JSON.stringify({
name,
@@ -68,22 +68,12 @@ export class AuthV2Repo {
}
}
async resetPassword(name: string, password: string, token: string) {
return await this.requestWithToken(token, "/auth/register", {
method: "POST",
body: JSON.stringify({
name,
password,
}),
});
}
async logout() {
if (this.accessToken === undefined) {
return;
}
await this.request("/auth/state", {
await this.request("/auth", {
method: "DELETE",
});
@@ -142,7 +132,7 @@ export class AuthV2Repo {
}
try {
const response = await this.requestWithToken(this.refreshToken!, "/auth/state", {
const response = await this.requestWithToken(this.refreshToken!, "/auth", {
method: "PUT",
}).then(value => value.json()).then(value => AuthTokenSchema.parse(value));