[{"data":1,"prerenderedAt":515},["ShallowReactive",2],{"navigation_docs":3,"-concepts-guarantees":189,"-concepts-guarantees-surround":510},[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":61,"body":191,"description":503,"extension":504,"links":505,"meta":506,"navigation":507,"path":62,"seo":508,"stem":63,"__hash__":509},"docs/2.concepts/6.guarantees.md",{"type":192,"value":193,"toc":493},"minimark",[194,198,203,271,275,315,319,356,360,390,394,451,455],[195,196,197],"p",{},"These are the behaviors Authyra commits to. Each one links to the tests that reproduce the failure it prevents.",[199,200,202],"h2",{"id":201},"refresh","Refresh",[204,205,206,228,243,253],"ul",{},[207,208,209,213,214,221,222,227],"li",{},[210,211,212],"strong",{},"At most one refresh per session at a time."," Concurrent callers share it. A rotating refresh token is never presented twice by the same app instance. Tests: ",[215,216,220],"a",{"href":217,"rel":218},"https://github.com/meragix/authyra/blob/main/packages/authyra/test/refresh_test.dart",[219],"nofollow","concurrent callers share a single refresh",", ",[215,223,226],{"href":224,"rel":225},"https://github.com/meragix/authyra/blob/main/packages/authyra_dio/test/authyra_interceptor_test.dart",[219],"20 concurrent 401s share a single refresh",".",[207,229,230,233,234,221,239,227],{},[210,231,232],{},"The latest refresh token is always the one used."," A refresh that starts after another one finished uses the token it produced. Tests: ",[215,235,238],{"href":236,"rel":237},"https://github.com/meragix/authyra/blob/main/packages/authyra/test/robustness_test.dart",[219],"switchTo during a refresh keeps the rotated refresh token",[215,240,242],{"href":217,"rel":241},[219],"a refresh finishing after a new sign-in keeps the newer tokens",[207,244,245,248,249,227],{},[210,246,247],{},"A 401 does not cause a refresh if the token was already replaced."," The caller gets the new token directly. Tests: ",[215,250,252],{"href":217,"rel":251},[219],"a 401 on a token already replaced returns the new one",[207,254,255,258,259,221,263,221,267,227],{},[210,256,257],{},"Transient failures never end a session."," Network errors, timeouts and server errors keep it and are retried with backoff. A session ends when the server rejects its refresh token, or, for a session that cannot be refreshed, when its access token is rejected or expires. Tests: ",[215,260,262],{"href":217,"rel":261},[219],"a transient failure keeps the session",[215,264,266],{"href":236,"rel":265},[219],"a long outage keeps a bounded retry rate",[215,268,270],{"href":217,"rel":269},[219],"a 401 without refresh support ends the session",[199,272,274],{"id":273},"persistence","Persistence",[204,276,277,287,301],{},[207,278,279,282,283,227],{},[210,280,281],{},"A change is visible only once persisted."," After a sign-out returns, a restart cannot bring the session back. Tests: ",[215,284,286],{"href":236,"rel":285},[219],"a failed sign-out write leaves memory and state unchanged",[207,288,289,292,293,221,297,227],{},[210,290,291],{},"Rotated tokens are never lost to a failed write."," They are kept in memory and written again until the write succeeds or the instance is disposed. Tests: ",[215,294,296],{"href":236,"rel":295},[219],"rotated tokens survive a failed write",[215,298,300],{"href":236,"rel":299},[219],"dispose writes tokens kept in memory after a failed write",[207,302,303,310,311,227],{},[210,304,305,309],{},[306,307,308],"code",{},"dispose()"," waits for writes in progress",", so another instance started afterwards reads the latest tokens. Tests: ",[215,312,314],{"href":236,"rel":313},[219],"dispose persists a refresh in flight for the next instance",[199,316,318],{"id":317},"sign-out","Sign-out",[204,320,321,335,346],{},[207,322,323,326,327,221,331,227],{},[210,324,325],{},"Sign-out wins over refresh."," No refresh starts once a sign-out begins; one already in flight is awaited (up to 10 seconds) so the server revokes the newest tokens. Tests: ",[215,328,330],{"href":236,"rel":329},[219],"no refresh starts while the session is being signed out",[215,332,334],{"href":236,"rel":333},[219],"signOut during a refresh revokes the rotated refresh token",[207,336,337,340,341,227],{},[210,338,339],{},"A server-side revocation failure never blocks the local sign-out."," Tests: ",[215,342,345],{"href":343,"rel":344},"https://github.com/meragix/authyra/blob/main/packages/authyra/test/authyra_test.dart",[219],"a failing server-side sign-out still removes the session locally",[207,347,348,351,352,227],{},[210,349,350],{},"A new sign-in wins over a pending sign-out."," If the same user signs in again while their sign-out is still revoking, the new session is kept. Tests: ",[215,353,355],{"href":236,"rel":354},[219],"a sign-in completing during signOut keeps the new session",[199,357,359],{"id":358},"accounts","Accounts",[204,361,362,376],{},[207,363,364,367,368,221,372,227],{},[210,365,366],{},"Sessions are isolated."," A request made with one account's token is never retried with another account's token, even after a switch. Tests: ",[215,369,371],{"href":224,"rel":370},[219],"a 401 refreshes the account the request was sent with",[215,373,375],{"href":236,"rel":374},[219],"a 401 for another account refreshes that account",[207,377,378,381,382,385,386,227],{},[210,379,380],{},"A refresh is not a state change."," ",[306,383,384],{},"AuthSignedIn"," changes when the active account changes, not when its tokens do. Tests: ",[215,387,389],{"href":343,"rel":388},[219],"a token refresh is an event, not a state change",[199,391,393],{"id":392},"secrets","Secrets",[204,395,396,410],{},[207,397,398,401,402,405,406,227],{},[210,399,400],{},"Authyra never prints token values."," The ",[306,403,404],{},"toString()"," of sessions, tokens and events hides them, and Authyra's own log messages never include them. Tests: ",[215,407,409],{"href":343,"rel":408},[219],"toString never exposes tokens",[207,411,412,381,415,418,419,422,423,426,427,430,431,433,434,221,439,221,443,221,447,227],{},[210,413,414],{},"OAuth security parameters cannot be overridden.",[306,416,417],{},"OAuth2Provider"," generates ",[306,420,421],{},"state",", a PKCE verifier and a ",[306,424,425],{},"nonce"," for each sign-in and checks them on return; ",[306,428,429],{},"BackendOAuthProvider"," checks ",[306,432,421],{},". Extra authorization parameters cannot replace them. Tests: ",[215,435,438],{"href":436,"rel":437},"https://github.com/meragix/authyra/blob/main/packages/authyra_flutter/test/oauth2_provider_test.dart",[219],"extra parameters cannot override the security parameters",[215,440,442],{"href":436,"rel":441},[219],"rejects a mismatched state",[215,444,446],{"href":436,"rel":445},[219],"rejects a replayed nonce",[215,448,442],{"href":449,"rel":450},"https://github.com/meragix/authyra/blob/main/packages/authyra_flutter/test/backend_oauth_provider_test.dart",[219],[199,452,454],{"id":453},"what-stays-your-responsibility","What stays your responsibility",[204,456,457,463,477,487],{},[207,458,459,462],{},[210,460,461],{},"Your backend verifies tokens."," Authyra trusts what your provider returns; it does not validate JWT signatures on the device.",[207,464,465,468,469,472,473,476],{},[210,466,467],{},"Your provider classifies errors."," Throw ",[306,470,471],{},"RefreshRevokedException"," only for a definitive rejection (",[306,474,475],{},"invalid_grant",", 401). Anything else is treated as temporary.",[207,478,479,482,483,486],{},[210,480,481],{},"One device, one app instance."," Coordination is per ",[306,484,485],{},"Authyra"," instance. Two processes sharing a refresh token (an app and its extension, two browser tabs) need a single owner or a server that tolerates it.",[207,488,489,492],{},[210,490,491],{},"Storage confidentiality depends on the platform."," On the web, any script on your origin can read what the app can.",{"title":494,"searchDepth":495,"depth":495,"links":496},"",2,[497,498,499,500,501,502],{"id":201,"depth":495,"text":202},{"id":273,"depth":495,"text":274},{"id":317,"depth":495,"text":318},{"id":358,"depth":495,"text":359},{"id":392,"depth":495,"text":393},{"id":453,"depth":495,"text":454},"What Authyra promises about sessions and tokens, and what it leaves to you.","md",null,{},{"icon":64},{"title":61,"description":503},"jPYBS_kZujgsl-Oja14X_Ij0NrHA_HRot1VVDk8J0zY",[511,513],{"title":56,"path":57,"stem":58,"description":512,"icon":59,"children":-1},"Where sessions are kept, how they survive restarts and failures, and how to plug your own storage.",{"title":71,"path":72,"stem":73,"description":514,"icon":74,"children":-1},"Which provider fits how your users sign in.",1794303128106]