Skip to content

Commit

Permalink
✨ feat(logout): 更新登录服务的登出方法实现
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Jun 25, 2024
1 parent 71caa8e commit 9bc4c43
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ui/projects/web/src/core/security/login/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,9 @@ export class LoginService {
return this.credentials;
}

/**
* 登出功能实现。
* 该方法负责协调登录状态的解除和相关登录信息的清除工作。
* 它调用认证模块的登出方法来解除用户认证状态,然后从存储中移除登录凭证,
* 最后将本地持有的凭证信息置为null,表示登出成功。
*/
logout() {
// 调用认证模块的登出方法,解除用户认证状态
this.auth.logout();
// 从存储中移除登录凭证,确保凭证信息不被非法访问
this.storage.remove(this.storageKey);
// 将本地持有的凭证信息置为null,表示当前用户已登出
this.credentials = null;
}
}

0 comments on commit 9bc4c43

Please sign in to comment.