MCPcopy
hub / github.com/21st-dev/1code / isAuthenticated

Method isAuthenticated

src/main/auth-store.ts:141–148  ·  view source on GitHub ↗

* Check if user is authenticated

()

Source from the content-addressed store, hash-verified

139 * Check if user is authenticated
140 */
141 isAuthenticated(): boolean {
142 const data = this.load()
143 if (!data) return false
144
145 // Check if token is expired
146 const expiresAt = new Date(data.expiresAt).getTime()
147 return expiresAt > Date.now()
148 }
149
150 /**
151 * Get current user if authenticated

Callers 5

index.tsFile · 0.45
registerIpcHandlersFunction · 0.45
createWindowFunction · 0.45
getUserPlanFunction · 0.45
voice.tsFile · 0.45

Calls 1

loadMethod · 0.95

Tested by

no test coverage detected