MCPcopy
hub / github.com/npmx-dev/npmx.dev / useServerSession

Function useServerSession

server/utils/server-session.ts:10–23  ·  view source on GitHub ↗
(event: H3Event)

Source from the content-addressed store, hash-verified

8 * @returns
9 */
10export const useServerSession = async (event: H3Event) => {
11 const config = useRuntimeConfig(event)
12
13 if (!config.sessionPassword) {
14 throw new Error('Session password is not configured')
15 }
16
17 const serverSession = await useSession<UserServerSession>(event, {
18 password: config.sessionPassword,
19 maxAge: CACHE_MAX_AGE_ONE_DAY * 179,
20 })
21
22 return serverSession
23}

Callers 2

atproto.get.tsFile · 0.90
getOAuthSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected