[{"data":1,"prerenderedAt":784,"buildId":785},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Fbearer-clients":50,"example-surround-\u002Fexamples\u002Fbearer-clients":610,"examples-en":619},[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":599,"description":600,"extension":601,"meta":602,"navigation":155,"order":226,"path":603,"seo":604,"stem":605,"uses":606,"__hash__":609},"examples_en\u002Fexamples\u002Fbearer-clients.md","Mobile apps and CLI tools",{"type":54,"value":55,"toc":596},"minimark",[56,76,500,563,568,592],[57,58,59,60,64,65,68,69,71,72,75],"p",{},"Native apps and command-line tools do not send Cookies or ",[61,62,63],"code",{},"Origin",". They send ",[61,66,67],{},"Authorization: Bearer \u003Ctoken>",". Verify that token in ",[61,70,14],{}," and say so with ",[61,73,74],{},"viaBearer: true","; the guard then skips the same-origin check for writes.",[77,78,84],"pre",{"className":79,"code":80,"filename":81,"language":82,"meta":83,"style":83},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","import { createError, getHeader } from 'h3'\nimport type { VerifyUser } from '@kurashina-design\u002Fnuxt-bff-guard'\n\nexport default (async (event) => {\n  const authorization = getHeader(event, 'authorization')\n  const bearer = \u002F^Bearer[ \\t]+(\\S+)$\u002Fi.exec(authorization ?? '')?.[1]\n\n  if (bearer) {\n    event.context.user = await verifyAccessToken(bearer) \u002F\u002F throws 401 when invalid\n    return { viaBearer: true }\n  }\n  \u002F\u002F Some other Authorization scheme: refuse instead of falling back to the Cookie.\n  if (authorization !== undefined) throw createError({ statusCode: 401 })\n\n  event.context.user = await verifySessionCookie(event)\n  return { viaBearer: false }\n}) satisfies VerifyUser\n","server\u002Fauth\u002Fverify-user.ts","ts","",[61,85,86,126,150,157,188,224,308,313,330,364,385,391,397,436,441,468,485],{"__ignoreMap":83},[87,88,91,95,99,103,106,109,112,115,119,123],"span",{"class":89,"line":90},"line",1,[87,92,94],{"class":93},"sVHd0","import",[87,96,98],{"class":97},"sP7_E"," {",[87,100,102],{"class":101},"su5hD"," createError",[87,104,105],{"class":97},",",[87,107,108],{"class":101}," getHeader",[87,110,111],{"class":97}," }",[87,113,114],{"class":93}," from",[87,116,118],{"class":117},"sjJ54"," '",[87,120,122],{"class":121},"s_sjI","h3",[87,124,125],{"class":117},"'\n",[87,127,129,131,134,136,139,141,143,145,148],{"class":89,"line":128},2,[87,130,94],{"class":93},[87,132,133],{"class":93}," type",[87,135,98],{"class":97},[87,137,138],{"class":101}," VerifyUser",[87,140,111],{"class":97},[87,142,114],{"class":93},[87,144,118],{"class":117},[87,146,147],{"class":121},"@kurashina-design\u002Fnuxt-bff-guard",[87,149,125],{"class":117},[87,151,153],{"class":89,"line":152},3,[87,154,156],{"emptyLinePlaceholder":155},true,"\n",[87,158,160,163,166,169,173,175,179,182,185],{"class":89,"line":159},4,[87,161,162],{"class":93},"export",[87,164,165],{"class":93}," default",[87,167,168],{"class":101}," (",[87,170,172],{"class":171},"sbsja","async",[87,174,168],{"class":97},[87,176,178],{"class":177},"s99_P","event",[87,180,181],{"class":97},")",[87,183,184],{"class":171}," =>",[87,186,187],{"class":97}," {\n",[87,189,191,194,198,202,205,209,211,213,215,218,221],{"class":89,"line":190},5,[87,192,193],{"class":171},"  const",[87,195,197],{"class":196},"s_hVV"," authorization",[87,199,201],{"class":200},"smGrS"," =",[87,203,108],{"class":204},"sGLFI",[87,206,208],{"class":207},"skxfh","(",[87,210,178],{"class":101},[87,212,105],{"class":97},[87,214,118],{"class":117},[87,216,217],{"class":121},"authorization",[87,219,220],{"class":117},"'",[87,222,223],{"class":207},")\n",[87,225,227,229,232,234,237,240,244,248,252,255,258,261,264,266,268,271,274,278,281,284,286,288,291,294,296,299,301,305],{"class":89,"line":226},6,[87,228,193],{"class":171},[87,230,231],{"class":196}," bearer",[87,233,201],{"class":200},[87,235,236],{"class":117}," \u002F",[87,238,239],{"class":93},"^",[87,241,243],{"class":242},"sQRbd","Bearer",[87,245,247],{"class":246},"s39Yj","[",[87,249,251],{"class":250},"stzsN"," \\t",[87,253,254],{"class":246},"]",[87,256,257],{"class":200},"+",[87,259,208],{"class":260},"s-KJb",[87,262,263],{"class":250},"\\S",[87,265,257],{"class":200},[87,267,181],{"class":260},[87,269,270],{"class":93},"$",[87,272,273],{"class":117},"\u002F",[87,275,277],{"class":276},"sw1J6","i",[87,279,280],{"class":97},".",[87,282,283],{"class":204},"exec",[87,285,208],{"class":207},[87,287,217],{"class":101},[87,289,290],{"class":200}," ??",[87,292,293],{"class":117}," ''",[87,295,181],{"class":207},[87,297,298],{"class":97},"?.",[87,300,247],{"class":207},[87,302,304],{"class":303},"srdBf","1",[87,306,307],{"class":207},"]\n",[87,309,311],{"class":89,"line":310},7,[87,312,156],{"emptyLinePlaceholder":155},[87,314,316,319,321,324,327],{"class":89,"line":315},8,[87,317,318],{"class":93},"  if",[87,320,168],{"class":207},[87,322,323],{"class":101},"bearer",[87,325,326],{"class":207},") ",[87,328,329],{"class":97},"{\n",[87,331,333,336,338,341,343,346,348,351,354,356,358,360],{"class":89,"line":332},9,[87,334,335],{"class":101},"    event",[87,337,280],{"class":97},[87,339,340],{"class":101},"context",[87,342,280],{"class":97},[87,344,345],{"class":101},"user",[87,347,201],{"class":200},[87,349,350],{"class":93}," await",[87,352,353],{"class":204}," verifyAccessToken",[87,355,208],{"class":207},[87,357,323],{"class":101},[87,359,326],{"class":207},[87,361,363],{"class":362},"sutJx","\u002F\u002F throws 401 when invalid\n",[87,365,367,370,372,375,378,382],{"class":89,"line":366},10,[87,368,369],{"class":93},"    return",[87,371,98],{"class":97},[87,373,374],{"class":207}," viaBearer",[87,376,377],{"class":97},":",[87,379,381],{"class":380},"syTEX"," true",[87,383,384],{"class":97}," }\n",[87,386,388],{"class":89,"line":387},11,[87,389,390],{"class":97},"  }\n",[87,392,394],{"class":89,"line":393},12,[87,395,396],{"class":362},"  \u002F\u002F Some other Authorization scheme: refuse instead of falling back to the Cookie.\n",[87,398,400,402,404,406,409,412,414,417,419,421,424,427,429,432,434],{"class":89,"line":399},13,[87,401,318],{"class":93},[87,403,168],{"class":207},[87,405,217],{"class":101},[87,407,408],{"class":200}," !==",[87,410,411],{"class":246}," undefined",[87,413,326],{"class":207},[87,415,416],{"class":93},"throw",[87,418,102],{"class":204},[87,420,208],{"class":207},[87,422,423],{"class":97},"{",[87,425,426],{"class":207}," statusCode",[87,428,377],{"class":97},[87,430,431],{"class":303}," 401",[87,433,111],{"class":97},[87,435,223],{"class":207},[87,437,439],{"class":89,"line":438},14,[87,440,156],{"emptyLinePlaceholder":155},[87,442,444,447,449,451,453,455,457,459,462,464,466],{"class":89,"line":443},15,[87,445,446],{"class":101},"  event",[87,448,280],{"class":97},[87,450,340],{"class":101},[87,452,280],{"class":97},[87,454,345],{"class":101},[87,456,201],{"class":200},[87,458,350],{"class":93},[87,460,461],{"class":204}," verifySessionCookie",[87,463,208],{"class":207},[87,465,178],{"class":101},[87,467,223],{"class":207},[87,469,471,474,476,478,480,483],{"class":89,"line":470},16,[87,472,473],{"class":93},"  return",[87,475,98],{"class":97},[87,477,374],{"class":207},[87,479,377],{"class":97},[87,481,482],{"class":380}," false",[87,484,384],{"class":97},[87,486,488,491,493,496],{"class":89,"line":487},17,[87,489,490],{"class":97},"}",[87,492,326],{"class":101},[87,494,495],{"class":93},"satisfies",[87,497,499],{"class":498},"sbgvK"," VerifyUser\n",[77,501,505],{"className":502,"code":503,"language":504,"meta":83,"style":83},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","curl -X POST https:\u002F\u002Fapp.example.com\u002Fapi\u002Forders \\\n  -H 'Authorization: Bearer eyJhbGciOi...' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"item\":\"tea\",\"quantity\":2}'\n","bash",[61,506,507,524,538,551],{"__ignoreMap":83},[87,508,509,512,515,518,521],{"class":89,"line":90},[87,510,511],{"class":498},"curl",[87,513,514],{"class":250}," -X",[87,516,517],{"class":121}," POST",[87,519,520],{"class":121}," https:\u002F\u002Fapp.example.com\u002Fapi\u002Forders",[87,522,523],{"class":196}," \\\n",[87,525,526,529,531,534,536],{"class":89,"line":128},[87,527,528],{"class":250},"  -H",[87,530,118],{"class":117},[87,532,533],{"class":121},"Authorization: Bearer eyJhbGciOi...",[87,535,220],{"class":117},[87,537,523],{"class":196},[87,539,540,542,544,547,549],{"class":89,"line":152},[87,541,528],{"class":250},[87,543,118],{"class":117},[87,545,546],{"class":121},"Content-Type: application\u002Fjson",[87,548,220],{"class":117},[87,550,523],{"class":196},[87,552,553,556,558,561],{"class":89,"line":159},[87,554,555],{"class":250},"  -d",[87,557,118],{"class":117},[87,559,560],{"class":121},"{\"item\":\"tea\",\"quantity\":2}",[87,562,125],{"class":117},[564,565,567],"h2",{"id":566},"rules","Rules",[569,570,571,586,589],"ul",{},[572,573,574,575,577,578,581,582,585],"li",{},"Return ",[61,576,74],{}," only after you verified the token. The guard also checks that the header really is ",[61,579,580],{},"Bearer \u003Cone token>",", so a wrong ",[61,583,584],{},"true"," for a Cookie request has no effect.",[572,587,588],{},"If both a Bearer token and a Cookie arrive, decide on one. The example above uses the token and ignores the Cookie.",[572,590,591],{},"Keep Bearer tokens out of URLs and query strings; the guard's logs record paths, and so do proxies.",[593,594,595],"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 .sQRbd, html code.shiki .sQRbd{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s-KJb, html code.shiki .s-KJb{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#DBEDFF}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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);}",{"title":83,"searchDepth":128,"depth":128,"links":597},[598],{"id":566,"depth":128,"text":567},"patterns","One BFF for the browser and for clients that send Bearer tokens.","md",{},"\u002Fexamples\u002Fbearer-clients",{"title":52,"description":600},"examples\u002Fbearer-clients",[607,608],"viaBearer","Authorization","CtYiMuKOJ63NvAd48yUS8gCDO1FyXWAdUi94IKef690",[611,615],{"path":612,"title":613,"description":614,"category":599,"order":190},"\u002Fexamples\u002Fwebhooks","Webhooks","Server-to-server callbacks belong outside server\u002Fapi, with their own signature check.",{"path":616,"title":617,"description":618,"category":599,"order":310},"\u002Fexamples\u002Fmore-route-folders","Checking more folders at build time","Extend routePatterns to server\u002Froutes and layers.",[620,629,636,643,648,655,663,671,678,686,694,701,709,716,722,728,735,741,749,755,760,762,765,770,777],{"path":621,"title":622,"description":623,"category":624,"order":90,"uses":625},"\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",[626,627,628],"access: 'visitor'","@nuxtjs\u002Fturnstile","nuxt-security",{"path":630,"title":631,"description":632,"category":624,"order":128,"uses":633},"\u002Fexamples\u002Fpaid-api-proxy","Search box that calls a paid API","Keep other sites and scripts from spending your API quota through your BFF.",[626,634,635],"rateLimiter","defineCachedFunction",{"path":637,"title":638,"description":639,"category":624,"order":152,"uses":640},"\u002Fexamples\u002Fclient-data","JSON for client-side pages","Data that your pages fetch in the browser, kept from being embedded by other sites.",[626,641,642],"access: 'public'","useFetch",{"path":644,"title":645,"description":646,"category":624,"order":159,"uses":647},"\u002Fexamples\u002Fmember-site-contact","Visitor routes inside a member app","Keep 'user' as the default and open a few routes to visitors without accounts.",[626,14],{"path":649,"title":650,"description":651,"category":652,"order":90,"uses":653},"\u002Fexamples\u002Fnuxt-auth-utils","nuxt-auth-utils","Use the sealed Cookie session of nuxt-auth-utils as the user check.","auth",[650,654],"requireUserSession",{"path":656,"title":657,"description":658,"category":652,"order":128,"uses":659},"\u002Fexamples\u002Fsidebase-nuxt-auth","Auth.js with @sidebase\u002Fnuxt-auth","Check the Auth.js session, and accept the same JWT as a Bearer token.",[660,661,662],"@sidebase\u002Fnuxt-auth","getServerSession","getToken",{"path":664,"title":665,"description":666,"category":652,"order":152,"uses":667},"\u002Fexamples\u002Fsupabase","Supabase","Verify the Supabase session with getClaims, and tell bad tokens from outages.",[668,669,670],"@nuxtjs\u002Fsupabase","getClaims","isAuthRetryableFetchError",{"path":672,"title":673,"description":674,"category":652,"order":159,"uses":675},"\u002Fexamples\u002Fclerk","Clerk","Read the auth object that Clerk's middleware put on the event.",[676,677],"@clerk\u002Fnuxt","event.context.auth",{"path":679,"title":680,"description":681,"category":652,"order":190,"uses":682},"\u002Fexamples\u002Ffirebase","Firebase Authentication","Session Cookies for the browser, ID tokens for apps, and error codes mapped to 401 or 503.",[683,684,685],"firebase-admin","verifySessionCookie","verifyIdToken",{"path":687,"title":688,"description":689,"category":652,"order":226,"uses":690},"\u002Fexamples\u002Fjwt-jose","Any OpenID Connect provider (JWT)","Verify access tokens from Auth0, Keycloak, Cognito, Entra ID and others with jose.",[691,692,693],"jose","jwtVerify","createRemoteJWKSet",{"path":695,"title":696,"description":697,"category":698,"order":90,"uses":699},"\u002Fexamples\u002Fnuxt-security-rate-limit","Rate limits with nuxt-security","Slow down credential stuffing and token guessing before verifyUser runs.","security",[628,634,700],"routeRules",{"path":702,"title":703,"description":704,"category":698,"order":128,"uses":705},"\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.",[628,706,707,708],"headers","requestSizeLimiter","allowedMethodsRestricter",{"path":710,"title":711,"description":712,"category":698,"order":152,"uses":713},"\u002Fexamples\u002Fnuxt-csurf","CSRF tokens with nuxt-csurf","Add a synchronizer token on top of the origin check, without breaking Bearer clients.",[714,715,700],"nuxt-csurf","useCsrfFetch",{"path":717,"title":718,"description":719,"category":698,"order":159,"uses":720},"\u002Fexamples\u002Fturnstile","Bot checks on public routes with Turnstile","Public sign-in and sign-up routes skip verifyUser, so give them their own check.",[627,721],"verifyTurnstileToken",{"path":723,"title":724,"description":725,"category":698,"order":190,"uses":726},"\u002Fexamples\u002Fcors-bearer-clients","A frontend on another origin","CORS with nuxt-security for a separate app that calls the BFF with Bearer tokens.",[628,727,607],"corsHandler",{"path":729,"title":730,"description":731,"category":599,"order":90,"uses":732},"\u002Fexamples\u002Frecord-authorization","Per-record authorization","The guard says who the user is. The handler decides what they may touch.",[733,734],"event.context","createError",{"path":736,"title":737,"description":738,"category":599,"order":128,"uses":739},"\u002Fexamples\u002Froles","Roles and app-wide access","Reject whole groups of users in verifyUser, and check roles per route.",[14,740],"403",{"path":742,"title":743,"description":744,"category":599,"order":152,"uses":745},"\u002Fexamples\u002Fupstream-proxy","Calling an upstream API","Attach the user's token after the guard, never in middleware or routeRules.proxy.",[746,747,748],"$fetch","routeRules.proxy","server\u002Futils",{"path":750,"title":751,"description":752,"category":599,"order":159,"uses":753},"\u002Fexamples\u002Fssr-and-server-functions","SSR and server functions","Call your own API during server rendering, or skip HTTP entirely.",[642,754,748],"useRequestFetch",{"path":612,"title":613,"description":614,"category":599,"order":190,"uses":756},[757,758,759],"server\u002Froutes","readRawBody","xssValidator",{"path":603,"title":52,"description":600,"category":599,"order":226,"uses":761},[607,608],{"path":616,"title":617,"description":618,"category":599,"order":310,"uses":763},[764],"routePatterns",{"path":766,"title":767,"description":768,"category":599,"order":315,"uses":769},"\u002Fexamples\u002Fpublic-cache","Caching public data","Cache what is the same for everyone on a separate public route.",[635,641],{"path":771,"title":772,"description":773,"category":599,"order":332,"uses":774},"\u002Fexamples\u002Fclient-errors","Handling 401, 403 and 503 in the app","Sign out on 401, explain 403, retry on 503.",[775,776],"$fetch.create","onResponseError",{"path":778,"title":779,"description":780,"category":599,"order":366,"uses":781},"\u002Fexamples\u002Ftesting","Testing the protection","An end-to-end test that every protected route refuses anonymous calls.",[782,783],"@nuxt\u002Ftest-utils","vitest",1796451484108,"a99f93bd-e267-45a7-90df-9194cd77468d"]