[{"data":1,"prerenderedAt":537},["ShallowReactive",2],{"navigation_docs":3,"-providers-choosing":189,"-providers-choosing-surround":532},[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":71,"body":191,"description":525,"extension":526,"links":527,"meta":528,"navigation":529,"path":72,"seo":530,"stem":73,"__hash__":531},"docs/3.providers/1.choosing.md",{"type":192,"value":193,"toc":522},"minimark",[194,198,310,313,494,499,518],[195,196,197],"p",{},"A provider answers one question: how does the user prove who they are, and who issues the tokens your API accepts?",[199,200,201,217],"table",{},[202,203,204],"thead",{},[205,206,207,211,214],"tr",{},[208,209,210],"th",{},"Your users sign in with",[208,212,213],{},"Tokens issued by",[208,215,216],{},"Use",[218,219,220,238,253,268,283,298],"tbody",{},[205,221,222,226,229],{},[223,224,225],"td",{},"Email or username and password, against your API",[223,227,228],{},"Your API",[223,230,231],{},[232,233,234],"a",{"href":77},[235,236,237],"code",{},"CredentialsProvider",[205,239,240,243,246],{},[223,241,242],{},"An OAuth 2.0 / OIDC server you control (Keycloak, Auth0, Zitadel, Okta, Cognito, Entra ID)",[223,244,245],{},"That server",[223,247,248],{},[232,249,250],{"href":82},[235,251,252],{},"OAuth2Provider",[205,254,255,258,261],{},[223,256,257],{},"A social login whose tokens your API does not accept (GitHub, GitLab, Discord, Slack...)",[223,259,260],{},"Your API, after your backend runs the OAuth flow",[223,262,263],{},[232,264,265],{"href":87},[235,266,267],{},"BackendOAuthProvider",[205,269,270,273,276],{},[223,271,272],{},"Google, with the native account picker",[223,274,275],{},"Your API, after it verifies Google's ID token",[223,277,278],{},[232,279,280],{"href":92},[235,281,282],{},"GoogleProvider.withExchange",[205,284,285,288,291],{},[223,286,287],{},"Apple, with the native sheet",[223,289,290],{},"Your API, after it verifies Apple's identity token",[223,292,293],{},[232,294,295],{"href":97},[235,296,297],{},"AppleProvider.withExchange",[205,299,300,303,305],{},[223,301,302],{},"Magic links, OTP, passkeys, anything else",[223,304,228],{},[223,306,307],{},[232,308,309],{"href":102},"A custom provider",[195,311,312],{},"An app can register several providers at once; each session remembers which one created it.",[314,315,320],"pre",{"className":316,"code":317,"language":318,"meta":319,"style":319},"language-dart shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","final authyra = await Authyra.initialize(\n  storage: SecureAuthStorage(),\n  providers: [\n    apiProvider,                             // id: 'api'\n    GoogleProvider.withExchange(exchange: exchangeGoogle),  // id: 'google'\n    AppleProvider.withExchange(exchange: exchangeApple),    // id: 'apple'\n  ],\n);\n\nawait authyra.signIn('google');\n","dart","",[235,321,322,357,375,386,399,423,445,453,462,469],{"__ignoreMap":319},[323,324,327,331,335,339,343,347,350,354],"span",{"class":325,"line":326},"line",1,[323,328,330],{"class":329},"spNyl","final",[323,332,334],{"class":333},"sTEyZ"," authyra ",[323,336,338],{"class":337},"sMK4o","=",[323,340,342],{"class":341},"s7zQu"," await",[323,344,346],{"class":345},"sBMFI"," Authyra",[323,348,349],{"class":337},".",[323,351,353],{"class":352},"s2Zo4","initialize",[323,355,356],{"class":333},"(\n",[323,358,360,363,366,369,372],{"class":325,"line":359},2,[323,361,362],{"class":333},"  storage",[323,364,365],{"class":337},":",[323,367,368],{"class":345}," SecureAuthStorage",[323,370,371],{"class":333},"()",[323,373,374],{"class":337},",\n",[323,376,378,381,383],{"class":325,"line":377},3,[323,379,380],{"class":333},"  providers",[323,382,365],{"class":337},[323,384,385],{"class":333}," [\n",[323,387,389,392,395],{"class":325,"line":388},4,[323,390,391],{"class":333},"    apiProvider",[323,393,394],{"class":337},",",[323,396,398],{"class":397},"sHwdD","                             // id: 'api'\n",[323,400,402,405,407,410,413,415,418,420],{"class":325,"line":401},5,[323,403,404],{"class":345},"    GoogleProvider",[323,406,349],{"class":337},[323,408,409],{"class":352},"withExchange",[323,411,412],{"class":333},"(exchange",[323,414,365],{"class":337},[323,416,417],{"class":333}," exchangeGoogle)",[323,419,394],{"class":337},[323,421,422],{"class":397},"  // id: 'google'\n",[323,424,426,429,431,433,435,437,440,442],{"class":325,"line":425},6,[323,427,428],{"class":345},"    AppleProvider",[323,430,349],{"class":337},[323,432,409],{"class":352},[323,434,412],{"class":333},[323,436,365],{"class":337},[323,438,439],{"class":333}," exchangeApple)",[323,441,394],{"class":337},[323,443,444],{"class":397},"    // id: 'apple'\n",[323,446,448,451],{"class":325,"line":447},7,[323,449,450],{"class":333},"  ]",[323,452,374],{"class":337},[323,454,456,459],{"class":325,"line":455},8,[323,457,458],{"class":333},")",[323,460,461],{"class":337},";\n",[323,463,465],{"class":325,"line":464},9,[323,466,468],{"emptyLinePlaceholder":467},true,"\n",[323,470,472,475,478,480,483,486,490,492],{"class":325,"line":471},10,[323,473,474],{"class":341},"await",[323,476,477],{"class":333}," authyra",[323,479,349],{"class":337},[323,481,482],{"class":352},"signIn",[323,484,485],{"class":333},"(",[323,487,489],{"class":488},"sfazB","'google'",[323,491,458],{"class":333},[323,493,461],{"class":337},[495,496,498],"h2",{"id":497},"identity-only","Identity only",[195,500,501,504,505,508,509,513,514,517],{},[235,502,503],{},"GoogleProvider()"," and ",[235,506,507],{},"AppleProvider()"," without an exchange sign the user in with an ",[510,511,512],"strong",{},"identity-only session",": no tokens, the provider's credential in ",[235,515,516],{},"providerData",". Use it when another SDK (Firebase, Supabase) consumes that credential, or when the app needs to know who the user is but calls no API on their behalf.",[519,520,521],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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":319,"searchDepth":359,"depth":359,"links":523},[524],{"id":497,"depth":359,"text":498},"Which provider fits how your users sign in.","md",null,{},{"icon":74},{"title":71,"description":525},"VgXd8Z2ivecS5p0qsWElGEUMHc5Pyo1tZobuTQ0Mu9A",[533,535],{"title":61,"path":62,"stem":63,"description":534,"icon":64,"children":-1},"What Authyra promises about sessions and tokens, and what it leaves to you.",{"title":76,"path":77,"stem":78,"description":536,"icon":79,"children":-1},"Sign in against your own API with an identifier and a password.",1794303128106]