[{"data":1,"prerenderedAt":391},["ShallowReactive",2],{"navigation":3,"/sanctum/proxy":51,"/sanctum/proxy-surround":386},[4,18,43],{"title":5,"path":6,"stem":7,"children":8,"icon":17},"Getting Started","/getting-started","1.getting-started/1.index",[9,12],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-simple-icons-laravel",{"title":13,"path":14,"stem":15,"icon":16},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",false,{"title":19,"path":20,"stem":21,"children":22,"page":17},"Sanctum","/sanctum","2.sanctum",[23,28,33,38],{"title":24,"path":25,"stem":26,"icon":27},"Configuration","/sanctum/configuration","2.sanctum/1.configuration","i-lucide-cog",{"title":29,"path":30,"stem":31,"icon":32},"Cookie Authentication","/sanctum/cookie","2.sanctum/2.cookie","i-lucide-cookie",{"title":34,"path":35,"stem":36,"icon":37},"Sanctum 2FA Flow","/sanctum/2fa","2.sanctum/3.2fa","i-lucide-shield-check",{"title":39,"path":40,"stem":41,"icon":42},"Server Proxy","/sanctum/proxy","2.sanctum/4.proxy","i-lucide-waypoints",{"title":44,"path":45,"stem":46,"children":47,"page":17},"Passport","/passport","3.passport",[48],{"title":24,"path":49,"stem":50,"icon":27},"/passport/configuration","3.passport/1.configuration",{"id":52,"title":39,"body":53,"description":379,"extension":380,"links":381,"meta":382,"navigation":383,"path":40,"seo":384,"stem":41,"__hash__":385},"docs/2.sanctum/4.proxy.md",{"type":54,"value":55,"toc":370},"minimark",[56,73,78,86,89,92,98,101,106,109,112,116,119,136,139,141,145,291,295,298,321,326,329,334,337,342,345,349,366],[57,58,59,63],"warning",{},[60,61,62],"p",{},"Internal Server Proxy (Planned)",[64,65,66,70],"ul",{},[67,68,69],"li",{},"This feature is not yet available.",[67,71,72],{},"It is planned for a future release of Nuxt Umbu.",[74,75,77],"h2",{"id":76},"overview","Overview",[60,79,80,81,85],{},"Nuxt Umbu will introduce an ",[82,83,84],"strong",{},"internal server proxy"," for the Sanctum provider to improve SSR compatibility and eliminate CORS complexity.",[60,87,88],{},"This feature will allow your Nuxt application to act as a reverse proxy between the browser and your Laravel API.",[60,90,91],{},"Instead of:",[60,93,94],{},[95,96,97],"code",{},"frontend.dev → api.frontend.dev",[60,99,100],{},"Requests will flow through the same origin:",[60,102,103],{},[95,104,105],{},"frontend.dev → frontend.dev/api/*",[60,107,108],{},"This greatly simplifies authentication when using cookie-based sessions.",[110,111],"hr",{},[74,113,115],{"id":114},"why-this-matters","Why This Matters",[60,117,118],{},"When using Laravel Sanctum with SSR:",[64,120,121,124,127,130],{},[67,122,123],{},"Cookies must be forwarded correctly",[67,125,126],{},"CSRF protection must be preserved",[67,128,129],{},"CORS must be configured if using different domains",[67,131,132,135],{},[95,133,134],{},"SANCTUM_STATEFUL_DOMAINS"," must be maintained",[60,137,138],{},"The internal proxy removes this complexity by ensuring all browser requests are same-origin.",[110,140],{},[74,142,144],{"id":143},"planned-configuration","Planned Configuration",[146,147,153],"pre",{"className":148,"code":149,"filename":150,"language":151,"meta":152,"style":152},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n    auth: {\n        provider: 'sanctum',\n        proxy: {\n            enabled: true,\n            route: '/api',\n            target: 'https://api.example.com'\n        }\n    }\n})\n","nuxt.config.ts","typescript","",[95,154,155,179,192,213,223,237,254,270,276,282],{"__ignoreMap":152},[156,157,160,164,167,171,175],"span",{"class":158,"line":159},"line",1,[156,161,163],{"class":162},"s7zQu","export",[156,165,166],{"class":162}," default",[156,168,170],{"class":169},"s2Zo4"," defineNuxtConfig",[156,172,174],{"class":173},"sTEyZ","(",[156,176,178],{"class":177},"sMK4o","{\n",[156,180,182,186,189],{"class":158,"line":181},2,[156,183,185],{"class":184},"swJcz","    auth",[156,187,188],{"class":177},":",[156,190,191],{"class":177}," {\n",[156,193,195,198,200,203,207,210],{"class":158,"line":194},3,[156,196,197],{"class":184},"        provider",[156,199,188],{"class":177},[156,201,202],{"class":177}," '",[156,204,206],{"class":205},"sfazB","sanctum",[156,208,209],{"class":177},"'",[156,211,212],{"class":177},",\n",[156,214,216,219,221],{"class":158,"line":215},4,[156,217,218],{"class":184},"        proxy",[156,220,188],{"class":177},[156,222,191],{"class":177},[156,224,226,229,231,235],{"class":158,"line":225},5,[156,227,228],{"class":184},"            enabled",[156,230,188],{"class":177},[156,232,234],{"class":233},"sfNiH"," true",[156,236,212],{"class":177},[156,238,240,243,245,247,250,252],{"class":158,"line":239},6,[156,241,242],{"class":184},"            route",[156,244,188],{"class":177},[156,246,202],{"class":177},[156,248,249],{"class":205},"/api",[156,251,209],{"class":177},[156,253,212],{"class":177},[156,255,257,260,262,264,267],{"class":158,"line":256},7,[156,258,259],{"class":184},"            target",[156,261,188],{"class":177},[156,263,202],{"class":177},[156,265,266],{"class":205},"https://api.example.com",[156,268,269],{"class":177},"'\n",[156,271,273],{"class":158,"line":272},8,[156,274,275],{"class":177},"        }\n",[156,277,279],{"class":158,"line":278},9,[156,280,281],{"class":177},"    }\n",[156,283,285,288],{"class":158,"line":284},10,[156,286,287],{"class":177},"}",[156,289,290],{"class":173},")\n",[74,292,294],{"id":293},"expected-behaviour","Expected Behaviour",[60,296,297],{},"When enabled:",[64,299,300,306,312,315,318],{},[67,301,302,303],{},"A Nitro catch-all route will be created at ",[95,304,305],{},"/api/**",[67,307,308,309],{},"Requests will be forwarded to ",[95,310,311],{},"proxy.target",[67,313,314],{},"The route prefix will be stripped",[67,316,317],{},"Cookies, headers, method and body will be preserved",[67,319,320],{},"The original backend response will be returned untouched",[322,323,325],"h3",{"id":324},"example","Example",[60,327,328],{},"Request from browser:",[60,330,331],{},[95,332,333],{},"GET /api/user/profile",[60,335,336],{},"Forwarded internally to:",[60,338,339],{},[95,340,341],{},"GET https://api.example.com/user/profile",[60,343,344],{},"The browser remains unaware of the backend domain.",[74,346,348],{"id":347},"benefits","Benefits",[64,350,351,354,357,360,363],{},[67,352,353],{},"No CORS configuration",[67,355,356],{},"No cross-domain cookie issues",[67,358,359],{},"Full SSR compatibility",[67,361,362],{},"Cleaner production deployment",[67,364,365],{},"Improved developer experience",[367,368,369],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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":152,"searchDepth":159,"depth":181,"links":371},[372,373,374,375,378],{"id":76,"depth":181,"text":77},{"id":114,"depth":181,"text":115},{"id":143,"depth":181,"text":144},{"id":293,"depth":181,"text":294,"children":376},[377],{"id":324,"depth":194,"text":325},{"id":347,"depth":181,"text":348},"Planned internal server proxy for Sanctum SSR support","md",null,{},{"icon":42},{"title":39,"description":379},"_pt0D59F_OU30m3g3mqCrkDn8UBubUC94kFwA7QzmqI",[387,389],{"title":34,"path":35,"stem":36,"description":388,"icon":37,"children":-1},"Complete 2FA flow with optional middleware in Nuxt Umbu",{"title":24,"path":49,"stem":50,"description":390,"icon":27,"children":-1},"How to configure Laravel Passport authentication in Nuxt Umbu",1774883773199]