MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getSession

Function getSession

packages/auth-client/src/client/index.tsx:195–206  ·  view source on GitHub ↗
(params?: GetSessionParams)

Source from the content-addressed store, hash-verified

193}
194
195export async function getSession(params?: GetSessionParams) {
196 const session = await fetchData<Session>(
197 'session',
198 __LINEN_AUTH,
199 logger,
200 params
201 );
202 if (params?.broadcast ? String(params.broadcast) !== 'false' : true) {
203 broadcast.post({ event: 'session', data: { trigger: 'getSession' } });
204 }
205 return session;
206}
207
208/**
209 * Returns the current Cross Site Request Forgery Token (CSRF Token)

Callers 3

startSignUpFunction · 0.90
onSuccessfulSignInFunction · 0.90
SessionProviderFunction · 0.85

Calls 1

postMethod · 0.45

Tested by

no test coverage detected