[{"data":1,"prerenderedAt":841,"buildId":842},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Frecord-authorization":50,"example-surround-\u002Fexamples\u002Frecord-authorization":667,"examples-en":677},[4],{"title":5,"path":6,"stem":7,"children":8,"page":49},"Docs","\u002Fdocs","docs",[9,13,17,21,25,29,33,37,41,45],{"title":10,"path":11,"stem":12},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started",{"title":14,"path":15,"stem":16},"verifyUser","\u002Fdocs\u002Fverify-user","docs\u002F02.verify-user",{"title":18,"path":19,"stem":20},"Sites without users","\u002Fdocs\u002Fsites-without-users","docs\u002F03.sites-without-users",{"title":22,"path":23,"stem":24},"Build-time route check","\u002Fdocs\u002Froute-coverage","docs\u002F04.route-coverage",{"title":26,"path":27,"stem":28},"Public routes","\u002Fdocs\u002Fpublic-routes","docs\u002F05.public-routes",{"title":30,"path":31,"stem":32},"Same-origin writes","\u002Fdocs\u002Fsame-origin","docs\u002F06.same-origin",{"title":34,"path":35,"stem":36},"Scope and caching","\u002Fdocs\u002Fscope","docs\u002F07.scope",{"title":38,"path":39,"stem":40},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002F08.configuration",{"title":42,"path":43,"stem":44},"Migrating an existing BFF guard","\u002Fdocs\u002Fmigration","docs\u002F09.migration",{"title":46,"path":47,"stem":48},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F10.contributing",false,{"id":51,"title":52,"body":53,"category":656,"description":657,"extension":658,"meta":659,"navigation":115,"order":77,"path":660,"seo":661,"stem":662,"uses":663,"__hash__":666},"examples_en\u002Fexamples\u002Frecord-authorization.md","Per-record authorization",{"type":54,"value":55,"toc":654},"minimark",[56,63,272,505,645,650],[57,58,59,62],"p",{},[60,61,14],"code",{}," answers \"is this a signed-in user of the app?\". It cannot know whether that user may read order 42. That check belongs in the handler, right next to the query.",[64,65,71],"pre",{"className":66,"code":67,"filename":68,"language":69,"meta":70,"style":70},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","import type { VerifyUser } from '@kurashina-design\u002Fnuxt-bff-guard'\n\nexport default (async (event) => {\n  const { user } = await requireUserSession(event) \u002F\u002F nuxt-auth-utils, or your own\n  event.context.user = { id: user.id, tenantId: user.tenantId }\n  return { viaBearer: false }\n}) satisfies VerifyUser\n","server\u002Fauth\u002Fverify-user.ts","ts","",[60,72,73,110,117,148,186,238,257],{"__ignoreMap":70},[74,75,78,82,85,89,93,96,99,103,107],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"sVHd0","import",[74,83,84],{"class":80}," type",[74,86,88],{"class":87},"sP7_E"," {",[74,90,92],{"class":91},"su5hD"," VerifyUser",[74,94,95],{"class":87}," }",[74,97,98],{"class":80}," from",[74,100,102],{"class":101},"sjJ54"," '",[74,104,106],{"class":105},"s_sjI","@kurashina-design\u002Fnuxt-bff-guard",[74,108,109],{"class":101},"'\n",[74,111,113],{"class":76,"line":112},2,[74,114,116],{"emptyLinePlaceholder":115},true,"\n",[74,118,120,123,126,129,133,135,139,142,145],{"class":76,"line":119},3,[74,121,122],{"class":80},"export",[74,124,125],{"class":80}," default",[74,127,128],{"class":91}," (",[74,130,132],{"class":131},"sbsja","async",[74,134,128],{"class":87},[74,136,138],{"class":137},"s99_P","event",[74,140,141],{"class":87},")",[74,143,144],{"class":131}," =>",[74,146,147],{"class":87}," {\n",[74,149,151,154,156,160,162,166,169,173,177,179,182],{"class":76,"line":150},4,[74,152,153],{"class":131},"  const",[74,155,88],{"class":87},[74,157,159],{"class":158},"s_hVV"," user",[74,161,95],{"class":87},[74,163,165],{"class":164},"smGrS"," =",[74,167,168],{"class":80}," await",[74,170,172],{"class":171},"sGLFI"," requireUserSession",[74,174,176],{"class":175},"skxfh","(",[74,178,138],{"class":91},[74,180,181],{"class":175},") ",[74,183,185],{"class":184},"sutJx","\u002F\u002F nuxt-auth-utils, or your own\n",[74,187,189,192,195,198,200,203,205,207,210,213,215,217,220,223,226,228,230,232,235],{"class":76,"line":188},5,[74,190,191],{"class":91},"  event",[74,193,194],{"class":87},".",[74,196,197],{"class":91},"context",[74,199,194],{"class":87},[74,201,202],{"class":91},"user",[74,204,165],{"class":164},[74,206,88],{"class":87},[74,208,209],{"class":175}," id",[74,211,212],{"class":87},":",[74,214,159],{"class":91},[74,216,194],{"class":87},[74,218,219],{"class":91},"id",[74,221,222],{"class":87},",",[74,224,225],{"class":175}," tenantId",[74,227,212],{"class":87},[74,229,159],{"class":91},[74,231,194],{"class":87},[74,233,234],{"class":91},"tenantId",[74,236,237],{"class":87}," }\n",[74,239,241,244,246,249,251,255],{"class":76,"line":240},6,[74,242,243],{"class":80},"  return",[74,245,88],{"class":87},[74,247,248],{"class":175}," viaBearer",[74,250,212],{"class":87},[74,252,254],{"class":253},"syTEX"," false",[74,256,237],{"class":87},[74,258,260,263,265,268],{"class":76,"line":259},7,[74,261,262],{"class":87},"}",[74,264,181],{"class":91},[74,266,267],{"class":80},"satisfies",[74,269,271],{"class":270},"sbgvK"," VerifyUser\n",[64,273,276],{"className":66,"code":274,"filename":275,"language":69,"meta":70,"style":70},"import { defineBffHandler } from '#bff-guard'\n\nexport default defineBffHandler(async (event) => {\n  const user = event.context.user!\n  const id = getRouterParam(event, 'id')!\n\n  \u002F\u002F Scope the query to the user's tenant instead of loading first and checking after.\n  const order = await db.order.findFirst({ where: { id, tenantId: user.tenantId } })\n\n  \u002F\u002F 404, not 403: do not reveal that the order exists in another tenant.\n  if (!order) throw createError({ statusCode: 404 })\n  return order\n})\n","server\u002Fapi\u002Forders\u002F[id].get.ts",[60,277,278,298,302,324,346,374,378,383,441,446,452,490,498],{"__ignoreMap":70},[74,279,280,282,284,287,289,291,293,296],{"class":76,"line":77},[74,281,81],{"class":80},[74,283,88],{"class":87},[74,285,286],{"class":91}," defineBffHandler",[74,288,95],{"class":87},[74,290,98],{"class":80},[74,292,102],{"class":101},[74,294,295],{"class":105},"#bff-guard",[74,297,109],{"class":101},[74,299,300],{"class":76,"line":112},[74,301,116],{"emptyLinePlaceholder":115},[74,303,304,306,308,310,312,314,316,318,320,322],{"class":76,"line":119},[74,305,122],{"class":80},[74,307,125],{"class":80},[74,309,286],{"class":171},[74,311,176],{"class":91},[74,313,132],{"class":131},[74,315,128],{"class":87},[74,317,138],{"class":137},[74,319,141],{"class":87},[74,321,144],{"class":131},[74,323,147],{"class":87},[74,325,326,328,330,332,335,337,339,341,343],{"class":76,"line":150},[74,327,153],{"class":131},[74,329,159],{"class":158},[74,331,165],{"class":164},[74,333,334],{"class":91}," event",[74,336,194],{"class":87},[74,338,197],{"class":91},[74,340,194],{"class":87},[74,342,202],{"class":91},[74,344,345],{"class":164},"!\n",[74,347,348,350,352,354,357,359,361,363,365,367,370,372],{"class":76,"line":188},[74,349,153],{"class":131},[74,351,209],{"class":158},[74,353,165],{"class":164},[74,355,356],{"class":171}," getRouterParam",[74,358,176],{"class":175},[74,360,138],{"class":91},[74,362,222],{"class":87},[74,364,102],{"class":101},[74,366,219],{"class":105},[74,368,369],{"class":101},"'",[74,371,141],{"class":175},[74,373,345],{"class":164},[74,375,376],{"class":76,"line":240},[74,377,116],{"emptyLinePlaceholder":115},[74,379,380],{"class":76,"line":259},[74,381,382],{"class":184},"  \u002F\u002F Scope the query to the user's tenant instead of loading first and checking after.\n",[74,384,386,388,391,393,395,398,400,403,405,408,410,413,416,418,420,422,424,426,428,430,432,434,436,438],{"class":76,"line":385},8,[74,387,153],{"class":131},[74,389,390],{"class":158}," order",[74,392,165],{"class":164},[74,394,168],{"class":80},[74,396,397],{"class":91}," db",[74,399,194],{"class":87},[74,401,402],{"class":91},"order",[74,404,194],{"class":87},[74,406,407],{"class":171},"findFirst",[74,409,176],{"class":175},[74,411,412],{"class":87},"{",[74,414,415],{"class":175}," where",[74,417,212],{"class":87},[74,419,88],{"class":87},[74,421,209],{"class":91},[74,423,222],{"class":87},[74,425,225],{"class":175},[74,427,212],{"class":87},[74,429,159],{"class":91},[74,431,194],{"class":87},[74,433,234],{"class":91},[74,435,95],{"class":87},[74,437,95],{"class":87},[74,439,440],{"class":175},")\n",[74,442,444],{"class":76,"line":443},9,[74,445,116],{"emptyLinePlaceholder":115},[74,447,449],{"class":76,"line":448},10,[74,450,451],{"class":184},"  \u002F\u002F 404, not 403: do not reveal that the order exists in another tenant.\n",[74,453,455,458,460,463,465,467,470,473,475,477,480,482,486,488],{"class":76,"line":454},11,[74,456,457],{"class":80},"  if",[74,459,128],{"class":175},[74,461,462],{"class":164},"!",[74,464,402],{"class":91},[74,466,181],{"class":175},[74,468,469],{"class":80},"throw",[74,471,472],{"class":171}," createError",[74,474,176],{"class":175},[74,476,412],{"class":87},[74,478,479],{"class":175}," statusCode",[74,481,212],{"class":87},[74,483,485],{"class":484},"srdBf"," 404",[74,487,95],{"class":87},[74,489,440],{"class":175},[74,491,493,495],{"class":76,"line":492},12,[74,494,243],{"class":80},[74,496,497],{"class":91}," order\n",[74,499,501,503],{"class":76,"line":500},13,[74,502,262],{"class":87},[74,504,440],{"class":91},[64,506,509],{"className":66,"code":507,"filename":508,"language":69,"meta":70,"style":70},"declare module 'h3' {\n  interface H3EventContext {\n    user?: { id: string, tenantId: string }\n  }\n}\n\n\u002F\u002F nuxt-auth-utils: the fields your session stores for each user.\ndeclare module '#auth-utils' {\n  interface User {\n    id: string\n    tenantId: string\n  }\n}\nexport {}\n","server\u002Ftypes\u002Fcontext.d.ts",[60,510,511,528,538,567,572,577,581,586,601,610,620,629,633,637],{"__ignoreMap":70},[74,512,513,516,519,521,524,526],{"class":76,"line":77},[74,514,515],{"class":131},"declare",[74,517,518],{"class":131}," module",[74,520,102],{"class":101},[74,522,523],{"class":105},"h3",[74,525,369],{"class":101},[74,527,147],{"class":87},[74,529,530,533,536],{"class":76,"line":112},[74,531,532],{"class":131},"  interface",[74,534,535],{"class":270}," H3EventContext",[74,537,147],{"class":87},[74,539,540,544,547,549,551,553,557,559,561,563,565],{"class":76,"line":119},[74,541,543],{"class":542},"sucvu","    user",[74,545,546],{"class":164},"?:",[74,548,88],{"class":87},[74,550,209],{"class":542},[74,552,212],{"class":164},[74,554,556],{"class":555},"sZMiF"," string",[74,558,222],{"class":87},[74,560,225],{"class":542},[74,562,212],{"class":164},[74,564,556],{"class":555},[74,566,237],{"class":87},[74,568,569],{"class":76,"line":150},[74,570,571],{"class":87},"  }\n",[74,573,574],{"class":76,"line":188},[74,575,576],{"class":87},"}\n",[74,578,579],{"class":76,"line":240},[74,580,116],{"emptyLinePlaceholder":115},[74,582,583],{"class":76,"line":259},[74,584,585],{"class":184},"\u002F\u002F nuxt-auth-utils: the fields your session stores for each user.\n",[74,587,588,590,592,594,597,599],{"class":76,"line":385},[74,589,515],{"class":131},[74,591,518],{"class":131},[74,593,102],{"class":101},[74,595,596],{"class":105},"#auth-utils",[74,598,369],{"class":101},[74,600,147],{"class":87},[74,602,603,605,608],{"class":76,"line":443},[74,604,532],{"class":131},[74,606,607],{"class":270}," User",[74,609,147],{"class":87},[74,611,612,615,617],{"class":76,"line":448},[74,613,614],{"class":542},"    id",[74,616,212],{"class":164},[74,618,619],{"class":555}," string\n",[74,621,622,625,627],{"class":76,"line":454},[74,623,624],{"class":542},"    tenantId",[74,626,212],{"class":164},[74,628,619],{"class":555},[74,630,631],{"class":76,"line":492},[74,632,571],{"class":87},[74,634,635],{"class":76,"line":500},[74,636,576],{"class":87},[74,638,640,642],{"class":76,"line":639},14,[74,641,122],{"class":80},[74,643,644],{"class":87}," {}\n",[57,646,647,648,194],{},"Errors that your handler throws pass through the guard unchanged: the 401\u002F403\u002F503 mapping applies only to ",[60,649,14],{},[651,652,653],"style",{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .syTEX, html code.shiki .syTEX{--shiki-light:#FF5370;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sucvu, html code.shiki .sucvu{--shiki-light:#E53935;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":70,"searchDepth":112,"depth":112,"links":655},[],"patterns","The guard says who the user is. The handler decides what they may touch.","md",{},"\u002Fexamples\u002Frecord-authorization",{"title":52,"description":657},"examples\u002Frecord-authorization",[664,665],"event.context","createError","VCmvJnixzrTg-hJcLCeysrTcf5Hg9zgYk5_XfClIaSU",[668,673],{"path":669,"title":670,"description":671,"category":672,"order":188},"\u002Fexamples\u002Fcors-bearer-clients","A frontend on another origin","CORS with nuxt-security for a separate app that calls the BFF with Bearer tokens.","security",{"path":674,"title":675,"description":676,"category":656,"order":112},"\u002Fexamples\u002Froles","Roles and app-wide access","Reject whole groups of users in verifyUser, and check roles per route.",[678,687,694,701,706,713,721,729,736,744,752,758,766,773,779,783,785,788,796,802,810,816,822,827,834],{"path":679,"title":680,"description":681,"category":682,"order":77,"uses":683},"\u002Fexamples\u002Fcontact-form","Contact form on a corporate site","A mail-sending route that only your own pages can call, with a bot check and a rate limit.","visitor",[684,685,686],"access: 'visitor'","@nuxtjs\u002Fturnstile","nuxt-security",{"path":688,"title":689,"description":690,"category":682,"order":112,"uses":691},"\u002Fexamples\u002Fpaid-api-proxy","Search box that calls a paid API","Keep other sites and scripts from spending your API quota through your BFF.",[684,692,693],"rateLimiter","defineCachedFunction",{"path":695,"title":696,"description":697,"category":682,"order":119,"uses":698},"\u002Fexamples\u002Fclient-data","JSON for client-side pages","Data that your pages fetch in the browser, kept from being embedded by other sites.",[684,699,700],"access: 'public'","useFetch",{"path":702,"title":703,"description":704,"category":682,"order":150,"uses":705},"\u002Fexamples\u002Fmember-site-contact","Visitor routes inside a member app","Keep 'user' as the default and open a few routes to visitors without accounts.",[684,14],{"path":707,"title":708,"description":709,"category":710,"order":77,"uses":711},"\u002Fexamples\u002Fnuxt-auth-utils","nuxt-auth-utils","Use the sealed Cookie session of nuxt-auth-utils as the user check.","auth",[708,712],"requireUserSession",{"path":714,"title":715,"description":716,"category":710,"order":112,"uses":717},"\u002Fexamples\u002Fsidebase-nuxt-auth","Auth.js with @sidebase\u002Fnuxt-auth","Check the Auth.js session, and accept the same JWT as a Bearer token.",[718,719,720],"@sidebase\u002Fnuxt-auth","getServerSession","getToken",{"path":722,"title":723,"description":724,"category":710,"order":119,"uses":725},"\u002Fexamples\u002Fsupabase","Supabase","Verify the Supabase session with getClaims, and tell bad tokens from outages.",[726,727,728],"@nuxtjs\u002Fsupabase","getClaims","isAuthRetryableFetchError",{"path":730,"title":731,"description":732,"category":710,"order":150,"uses":733},"\u002Fexamples\u002Fclerk","Clerk","Read the auth object that Clerk's middleware put on the event.",[734,735],"@clerk\u002Fnuxt","event.context.auth",{"path":737,"title":738,"description":739,"category":710,"order":188,"uses":740},"\u002Fexamples\u002Ffirebase","Firebase Authentication","Session Cookies for the browser, ID tokens for apps, and error codes mapped to 401 or 503.",[741,742,743],"firebase-admin","verifySessionCookie","verifyIdToken",{"path":745,"title":746,"description":747,"category":710,"order":240,"uses":748},"\u002Fexamples\u002Fjwt-jose","Any OpenID Connect provider (JWT)","Verify access tokens from Auth0, Keycloak, Cognito, Entra ID and others with jose.",[749,750,751],"jose","jwtVerify","createRemoteJWKSet",{"path":753,"title":754,"description":755,"category":672,"order":77,"uses":756},"\u002Fexamples\u002Fnuxt-security-rate-limit","Rate limits with nuxt-security","Slow down credential stuffing and token guessing before verifyUser runs.",[686,692,757],"routeRules",{"path":759,"title":760,"description":761,"category":672,"order":112,"uses":762},"\u002Fexamples\u002Fnuxt-security-headers","Headers, CSP and request limits with nuxt-security","A baseline nuxt-security setup next to the guard, tuned for a BFF.",[686,763,764,765],"headers","requestSizeLimiter","allowedMethodsRestricter",{"path":767,"title":768,"description":769,"category":672,"order":119,"uses":770},"\u002Fexamples\u002Fnuxt-csurf","CSRF tokens with nuxt-csurf","Add a synchronizer token on top of the origin check, without breaking Bearer clients.",[771,772,757],"nuxt-csurf","useCsrfFetch",{"path":774,"title":775,"description":776,"category":672,"order":150,"uses":777},"\u002Fexamples\u002Fturnstile","Bot checks on public routes with Turnstile","Public sign-in and sign-up routes skip verifyUser, so give them their own check.",[685,778],"verifyTurnstileToken",{"path":669,"title":670,"description":671,"category":672,"order":188,"uses":780},[686,781,782],"corsHandler","viaBearer",{"path":660,"title":52,"description":657,"category":656,"order":77,"uses":784},[664,665],{"path":674,"title":675,"description":676,"category":656,"order":112,"uses":786},[14,787],"403",{"path":789,"title":790,"description":791,"category":656,"order":119,"uses":792},"\u002Fexamples\u002Fupstream-proxy","Calling an upstream API","Attach the user's token after the guard, never in middleware or routeRules.proxy.",[793,794,795],"$fetch","routeRules.proxy","server\u002Futils",{"path":797,"title":798,"description":799,"category":656,"order":150,"uses":800},"\u002Fexamples\u002Fssr-and-server-functions","SSR and server functions","Call your own API during server rendering, or skip HTTP entirely.",[700,801,795],"useRequestFetch",{"path":803,"title":804,"description":805,"category":656,"order":188,"uses":806},"\u002Fexamples\u002Fwebhooks","Webhooks","Server-to-server callbacks belong outside server\u002Fapi, with their own signature check.",[807,808,809],"server\u002Froutes","readRawBody","xssValidator",{"path":811,"title":812,"description":813,"category":656,"order":240,"uses":814},"\u002Fexamples\u002Fbearer-clients","Mobile apps and CLI tools","One BFF for the browser and for clients that send Bearer tokens.",[782,815],"Authorization",{"path":817,"title":818,"description":819,"category":656,"order":259,"uses":820},"\u002Fexamples\u002Fmore-route-folders","Checking more folders at build time","Extend routePatterns to server\u002Froutes and layers.",[821],"routePatterns",{"path":823,"title":824,"description":825,"category":656,"order":385,"uses":826},"\u002Fexamples\u002Fpublic-cache","Caching public data","Cache what is the same for everyone on a separate public route.",[693,699],{"path":828,"title":829,"description":830,"category":656,"order":443,"uses":831},"\u002Fexamples\u002Fclient-errors","Handling 401, 403 and 503 in the app","Sign out on 401, explain 403, retry on 503.",[832,833],"$fetch.create","onResponseError",{"path":835,"title":836,"description":837,"category":656,"order":448,"uses":838},"\u002Fexamples\u002Ftesting","Testing the protection","An end-to-end test that every protected route refuses anonymous calls.",[839,840],"@nuxt\u002Ftest-utils","vitest",1796451484045,"a99f93bd-e267-45a7-90df-9194cd77468d"]