mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-13 17:35:37 +00:00
fix(web): avoid false default-password reminders
Only flag seeded accounts that still use the shipped password hash, and keep auth status and password change responses stable during review follow-up.
This commit is contained in:
@@ -164,10 +164,21 @@ export class ApiClient {
|
||||
}
|
||||
|
||||
public async check_login_status(): Promise<CheckLoginStatusResponse> {
|
||||
const response = await this.client.get<any, AuthStatusResponse>('/auth/check_login_status');
|
||||
return {
|
||||
loggedIn: true,
|
||||
mustChangePassword: response.must_change_password,
|
||||
try {
|
||||
const response = await this.client.get<any, AuthStatusResponse>('/auth/check_login_status');
|
||||
return {
|
||||
loggedIn: true,
|
||||
mustChangePassword: response.must_change_password,
|
||||
};
|
||||
} catch (error) {
|
||||
if (error instanceof AxiosError && error.response?.status === 401) {
|
||||
return {
|
||||
loggedIn: false,
|
||||
mustChangePassword: false,
|
||||
};
|
||||
}
|
||||
|
||||
throw error;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user