Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AntiHub-Project/AntiHub
/ isAuthenticated
Function
isAuthenticated
lib/api.ts:483–486 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
481
* 检查用户是否已登录
482
*/
483
export
function
isAuthenticated(): boolean {
484
if
(typeof window ===
'undefined'
)
return
false;
485
return
!!localStorage.getItem(
'access_token'
);
486
}
487
488
/**
489
* 获取本地存储的用户信息
Callers
3
Header
Function · 0.90
AuthPage
Function · 0.90
Home
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected