[{"data":1,"prerenderedAt":340},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-session-lab":189,"-getting-started-session-lab-surround":335},[4,30,65,105,120,135,164,184],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting started",false,"/getting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","/getting-started/introduction","1.getting-started/1.introduction","i-lucide-book-open",{"title":16,"path":17,"stem":18,"icon":19},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","/getting-started/quick-start","1.getting-started/3.quick-start","i-lucide-rocket",{"title":26,"path":27,"stem":28,"icon":29},"Session Lab","/getting-started/session-lab","1.getting-started/4.session-lab","i-lucide-flask-conical",{"title":31,"icon":6,"path":32,"stem":33,"children":34,"page":6},"Concepts","/concepts","2.concepts",[35,40,45,50,55,60],{"title":36,"path":37,"stem":38,"icon":39},"How it works","/concepts/how-it-works","2.concepts/1.how-it-works","i-lucide-workflow",{"title":41,"path":42,"stem":43,"icon":44},"Sessions and tokens","/concepts/sessions-and-tokens","2.concepts/2.sessions-and-tokens","i-lucide-key-round",{"title":46,"path":47,"stem":48,"icon":49},"State and events","/concepts/state-and-events","2.concepts/3.state-and-events","i-lucide-radio",{"title":51,"path":52,"stem":53,"icon":54},"Token refresh","/concepts/token-refresh","2.concepts/4.token-refresh","i-lucide-refresh-cw",{"title":56,"path":57,"stem":58,"icon":59},"Storage","/concepts/storage","2.concepts/5.storage","i-lucide-hard-drive",{"title":61,"path":62,"stem":63,"icon":64},"Guarantees","/concepts/guarantees","2.concepts/6.guarantees","i-lucide-shield-check",{"title":66,"icon":6,"path":67,"stem":68,"children":69,"page":6},"Providers","/providers","3.providers",[70,75,80,85,90,95,100],{"title":71,"path":72,"stem":73,"icon":74},"Choosing a provider","/providers/choosing","3.providers/1.choosing","i-lucide-signpost",{"title":76,"path":77,"stem":78,"icon":79},"Credentials","/providers/credentials","3.providers/2.credentials","i-lucide-user-round-key",{"title":81,"path":82,"stem":83,"icon":84},"OAuth 2.0 and OpenID Connect","/providers/oauth2","3.providers/3.oauth2","i-lucide-shield",{"title":86,"path":87,"stem":88,"icon":89},"OAuth through your backend","/providers/backend-oauth","3.providers/4.backend-oauth","i-lucide-server",{"title":91,"path":92,"stem":93,"icon":94},"Google","/providers/google","3.providers/5.google","i-simple-icons-google",{"title":96,"path":97,"stem":98,"icon":99},"Apple","/providers/apple","3.providers/6.apple","i-simple-icons-apple",{"title":101,"path":102,"stem":103,"icon":104},"Custom providers","/providers/custom","3.providers/7.custom","i-lucide-puzzle",{"title":106,"icon":6,"path":107,"stem":108,"children":109,"page":6},"Flutter","/flutter","4.flutter",[110,115],{"title":111,"path":112,"stem":113,"icon":114},"Widgets","/flutter/widgets","4.flutter/1.widgets","i-lucide-layout-template",{"title":116,"path":117,"stem":118,"icon":119},"Routing","/flutter/routing","4.flutter/2.routing","i-lucide-route",{"title":121,"icon":6,"path":122,"stem":123,"children":124,"page":6},"HTTP","/http","5.http",[125,130],{"title":126,"path":127,"stem":128,"icon":129},"Dio","/http/dio","5.http/1.dio","i-lucide-arrow-left-right",{"title":131,"path":132,"stem":133,"icon":134},"Other HTTP clients","/http/other-clients","5.http/2.other-clients","i-lucide-plug-zap",{"title":136,"icon":6,"path":137,"stem":138,"children":139,"page":6},"Guides","/guides","6.guides",[140,145,150,155,159],{"title":141,"path":142,"stem":143,"icon":144},"Multiple accounts","/guides/multi-account","6.guides/1.multi-account","i-lucide-users",{"title":146,"path":147,"stem":148,"icon":149},"Sign-out and revocation","/guides/sign-out","6.guides/2.sign-out","i-lucide-log-out",{"title":151,"path":152,"stem":153,"icon":154},"Access policy","/guides/access-policy","6.guides/3.access-policy","i-lucide-shield-alert",{"title":156,"path":157,"stem":158,"icon":29},"Testing","/guides/testing","6.guides/4.testing",{"title":160,"path":161,"stem":162,"icon":163},"Backend requirements","/guides/backend-requirements","6.guides/5.backend-requirements","i-lucide-server-cog",{"title":165,"icon":6,"path":166,"stem":167,"children":168,"page":6},"Reference","/reference","7.reference",[169,174,179],{"title":170,"path":171,"stem":172,"icon":173},"API reference","/reference/api","7.reference/1.api","i-lucide-library",{"title":175,"path":176,"stem":177,"icon":178},"FAQ","/reference/faq","7.reference/2.faq","i-lucide-message-circle-question",{"title":180,"path":181,"stem":182,"icon":183},"Troubleshooting","/reference/troubleshooting","7.reference/3.troubleshooting","i-lucide-wrench",{"title":185,"path":186,"stem":187,"icon":188},"Changelog","/changelog","changelog","i-lucide-history",{"id":190,"title":26,"body":191,"description":328,"extension":329,"links":330,"meta":331,"navigation":332,"path":27,"seo":333,"stem":28,"__hash__":334},"docs/1.getting-started/4.session-lab.md",{"type":192,"value":193,"toc":321},"minimark",[194,210,217,222,245,249,302,306],[195,196,197,198,204,205,209],"p",{},"The ",[199,200,26],"a",{"href":201,"rel":202},"https://authyra-demo.pages.dev",[203],"nofollow"," runs Authyra, ",[206,207,208],"code",{},"AuthyraInterceptor"," and Dio in your browser, against an auth server you can break. Nothing is mocked on the client side: only the server and the network are simulated.",[211,212,216],"u-button",{"color":213,"icon":29,"size":214,"target":215,"to":201},"primary","lg","_blank","Open the Session Lab",[218,219,221],"h2",{"id":220},"what-is-on-screen","What is on screen",[223,224,225,233,239],"ul",{},[226,227,228,232],"li",{},[229,230,231],"strong",{},"The app",": a small expenses app, signed in through Authyra. Its data comes from the server, which picks it from the access token: you see whose token each request carried.",[226,234,235,238],{},[229,236,237],{},"The session",": the access token counting down, and every request drawn as a line, with refreshes shown as bands across them.",[226,240,241,244],{},[229,242,243],{},"The server",": a strict auth server with short access tokens (20 seconds by default) and single-use refresh tokens. Presenting a used refresh token revokes the whole session, with no grace period.",[218,246,248],{"id":247},"the-tour","The tour",[250,251,252,258,264,270],"ol",{},[226,253,254,257],{},[229,255,256],{},"Sign in."," The app receives an access token and a refresh token.",[226,259,260,263],{},[229,261,262],{},"Break a naive client."," The app sends its requests through a hand-written interceptor instead. The server rotates its signing keys, 20 requests get a 401 at once, and each one refreshes on its own. The second refresh presents a used token: the server revokes the session, and the app finds out on its next request.",[226,265,266,269],{},[229,267,268],{},"Same burst with Authyra."," The 20 requests wait behind a single refresh, then retry with the new token. One refresh call, 20 successes, still signed in.",[226,271,272,275],{},[229,273,274],{},"Keep breaking it.",[223,276,277,284,290,296],{},[226,278,279,283],{},[280,281,282],"em",{},"Cut the network",": refreshes fail, the session is kept, retries back off.",[226,285,286,289],{},[280,287,288],{},"Restart the app",": the session is restored from storage.",[226,291,292,295],{},[280,293,294],{},"Revoke on the server",": the next refresh is refused and the app signs out.",[226,297,298,301],{},[280,299,300],{},"Add a second account and switch",": each account keeps its own tokens.",[218,303,305],{"id":304},"source","Source",[195,307,308,309,316,317,320],{},"The lab lives in ",[199,310,313],{"href":311,"rel":312},"https://github.com/meragix/authyra/tree/main/examples/authyra_demo",[203],[206,314,315],{},"examples/authyra_demo",". Its scenarios are covered by end-to-end tests in ",[206,318,319],{},"test/lab_test.dart",".",{"title":322,"searchDepth":323,"depth":323,"links":324},"",2,[325,326,327],{"id":220,"depth":323,"text":221},{"id":247,"depth":323,"text":248},{"id":304,"depth":323,"text":305},"An interactive demo that runs the real Authyra against a fake, strict auth server in your browser.","md",null,{},{"icon":29},{"title":26,"description":328},"OpN5CG8WeuzgN-8efWrU56BF1ynAGc-k7gEXmrn_26o",[336,338],{"title":21,"path":22,"stem":23,"description":337,"icon":24,"children":-1},"Sign in against your own API, keep the session fresh and send authenticated requests.",{"title":36,"path":37,"stem":38,"description":339,"icon":39,"children":-1},"The roles of providers, Authyra, storage and your HTTP client, and what happens from sign-in to sign-out.",1794303128106]