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

Function getCsrfToken

packages/auth-client/src/client/index.tsx:215–226  ·  view source on GitHub ↗
(params?: CtxOrReq)

Source from the content-addressed store, hash-verified

213 *
214 */
215export async function getCsrfToken(params?: CtxOrReq) {
216 if (typeof window === 'undefined') {
217 return;
218 }
219 const response = await fetchData<{ csrfToken: string }>(
220 'csrf',
221 __LINEN_AUTH,
222 logger,
223 params
224 );
225 return response?.csrfToken;
226}
227
228/**
229 * It calls `/api/auth/providers` and returns

Callers 5

onSignInSubmitFunction · 0.90
onSignUpWithMagicLinkFunction · 0.90
onSignUpWithCredsSubmitFunction · 0.90
signInFunction · 0.85
signOutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected