import{s as ft,o as mt,n as dt}from"../chunks/scheduler.0cf4ef2e.js";import{S as _t,i as bt,e as i,s,c as u,h as Mt,a as r,d as n,b as o,f as ee,g as h,j as _,k,l,m as a,n as c,t as p,o as f,p as m}from"../chunks/index.abc433bf.js";import{C as $t}from"../chunks/CopyLLMTxtMenu.efc6b005.js";import{D as ce}from"../chunks/Docstring.e4170f41.js";import{C as pt}from"../chunks/CodeBlock.00dcd05e.js";import{E as jt}from"../chunks/ExampleCodeBlock.9d6d4e26.js";import{H as T,E as yt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.86d448e2.js";function At(pe){let d,J="Example:",v,j,y;return j=new pt({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGF0dGFjaF9odWdnaW5nZmFjZV9vYXV0aCUyQyUyMHBhcnNlX2h1Z2dpbmdmYWNlX29hdXRoJTBBJTBBJTIzJTIwQ3JlYXRlJTIwYSUyMEZhc3RBUEklMjBhcHAlMEFhcHAlMjAlM0QlMjBGYXN0QVBJKCklMEElMEElMjMlMjBBZGQlMjBPQXV0aCUyMGVuZHBvaW50cyUyMHRvJTIwdGhlJTIwRmFzdEFQSSUyMGFwcCUwQWF0dGFjaF9odWdnaW5nZmFjZV9vYXV0aChhcHApJTBBJTBBJTIzJTIwQWRkJTIwYSUyMHJvdXRlJTIwdGhhdCUyMGdyZWV0cyUyMHRoZSUyMHVzZXIlMjBpZiUyMHRoZXklMjBhcmUlMjBsb2dnZWQlMjBpbiUwQSU0MGFwcC5nZXQoJTIyJTJGJTIyKSUwQWRlZiUyMGdyZWV0X2pzb24ocmVxdWVzdCUzQSUyMFJlcXVlc3QpJTNBJTBBJTIwJTIwJTIwJTIwJTIzJTIwUmV0cmlldmUlMjB0aGUlMjBPQXV0aCUyMGluZm8lMjBmcm9tJTIwdGhlJTIwcmVxdWVzdCUwQSUyMCUyMCUyMCUyMG9hdXRoX2luZm8lMjAlM0QlMjBwYXJzZV9odWdnaW5nZmFjZV9vYXV0aChyZXF1ZXN0KSUyMCUyMCUyMyUyMGUuZy4lMjBPQXV0aEluZm8lMjBkYXRhY2xhc3MlMEElMjAlMjAlMjAlMjBpZiUyMG9hdXRoX2luZm8lMjBpcyUyME5vbmUlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMjJtc2clMjIlM0ElMjAlMjJOb3QlMjBsb2dnZWQlMjBpbiElMjIlN0QlMEElMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMjJtc2clMjIlM0ElMjBmJTIySGVsbG8lMkMlMjAlN0JvYXV0aF9pbmZvLnVzZXJfaW5mby5wcmVmZXJyZWRfdXNlcm5hbWUlN0QhJTIyJTdE",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> attach_huggingface_oauth, parse_huggingface_oauth

<span class="hljs-comment"># Create a FastAPI app</span>
app = FastAPI()

<span class="hljs-comment"># Add OAuth endpoints to the FastAPI app</span>
attach_huggingface_oauth(app)

<span class="hljs-comment"># Add a route that greets the user if they are logged in</span>
<span class="hljs-meta">@app.get(<span class="hljs-params"><span class="hljs-string">&quot;/&quot;</span></span>)</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">greet_json</span>(<span class="hljs-params">request: Request</span>):
    <span class="hljs-comment"># Retrieve the OAuth info from the request</span>
    oauth_info = parse_huggingface_oauth(request)  <span class="hljs-comment"># e.g. OAuthInfo dataclass</span>
    <span class="hljs-keyword">if</span> oauth_info <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>:
        <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;msg&quot;</span>: <span class="hljs-string">&quot;Not logged in!&quot;</span>}
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;msg&quot;</span>: <span class="hljs-string">f&quot;Hello, <span class="hljs-subst">{oauth_info.user_info.preferred_username}</span>!&quot;</span>}`,wrap:!1}}),{c(){d=i("p"),d.textContent=J,v=s(),u(j.$$.fragment)},l(g){d=r(g,"P",{"data-svelte-h":!0}),_(d)!=="svelte-11lpom8"&&(d.textContent=J),v=o(g),h(j.$$.fragment,g)},m(g,A){a(g,d,A),a(g,v,A),c(j,g,A),y=!0},p:dt,i(g){y||(p(j.$$.fragment,g),y=!0)},o(g){f(j.$$.fragment,g),y=!1},d(g){g&&(n(d),n(v)),m(j,g)}}}function vt(pe){let d,J,v,j,y,g,A,fe,B,Ye=`OAuth is an open standard for access delegation, commonly used to grant applications limited access to a user’s information without exposing their credentials. When combined with FastAPI it allows you to build secure APIs that allow users to log in using external identity providers like Google or GitHub.
In a usual scenario:`,me,Z,ze="<li>FastAPI will define the API endpoints and handles the HTTP requests.</li> <li>OAuth is integrated using libraries like fastapi.security or external tools like Authlib.</li> <li>When a user wants to log in, FastAPI redirects them to the OAuth provider’s login page.</li> <li>After successful login, the provider redirects back with a token.</li> <li>FastAPI verifies this token and uses it to authorize the user or fetch user profile data.</li>",de,F,Ke="This approach helps avoid handling passwords directly and offloads identity management to trusted providers.",_e,E,be,X,et="This module provides tools to integrate Hugging Face OAuth into a FastAPI application. It enables user authentication using the Hugging Face platform including mocked behavior for local development and real OAuth flow for Spaces.",Me,H,$e,q,tt='The <code>attach_huggingface_oauth</code> function adds login, logout, and callback endpoints to your FastAPI app. When used in a Space, it connects to the Hugging Face OAuth system. When used locally it will inject a mocked user. Click here to learn more about <a href="https://huggingface.co/docs/hub/en/spaces-oauth" rel="nofollow">adding a Sign-In with HF option to your Space</a>',je,V,ye,G,Ae,C,nt=`<p>You might also be interested in <a href="https://huggingface.co/spaces/Wauplin/fastapi-oauth/blob/main/app.py" rel="nofollow">a practical example that demonstrates OAuth in action</a>.
For a more comprehensive implementation, check out <a href="https://huggingface.co/spaces/medoidai/GiveBackGPT" rel="nofollow">medoidai/GiveBackGPT</a> Space which implements HF OAuth in a full-scale application.</p>`,ve,P,Ie,b,W,qe,te,at="Add OAuth endpoints to a FastAPI app to enable OAuth login with Hugging Face.",Ve,ne,st="How to use:",Ge,ae,ot='<li>Call this method on your FastAPI app to add the OAuth endpoints.</li> <li>Inside your route handlers, call <code>parse_huggingface_oauth(request)</code> to retrieve the OAuth info.</li> <li>If user is logged in, an <a href="/docs/huggingface_hub/main/en/package_reference/oauth#huggingface_hub.OAuthInfo">OAuthInfo</a> object is returned with the user’s info. If not, <code>None</code> is returned.</li> <li>In your app, make sure to add links to <code>/oauth/huggingface/login</code> and <code>/oauth/huggingface/logout</code> for the user to log in and out.</li>',Pe,U,xe,L,Oe,M,R,We,se,it='Returns the information from a logged-in user as a <a href="/docs/huggingface_hub/main/en/package_reference/oauth#huggingface_hub.OAuthInfo">OAuthInfo</a> object.',Le,oe,rt=`For flexibility and future-proofing, this method is very lax in its parsing and does not raise errors.
Missing fields are set to <code>None</code> without a warning.`,Re,ie,lt="Return <code>None</code>, if the user is not logged in (no info in session cookie).",Ne,re,gt='See <a href="/docs/huggingface_hub/main/en/package_reference/oauth#huggingface_hub.attach_huggingface_oauth">attach_huggingface_oauth()</a> for an example on how to use this method.',we,N,Te,x,Q,Qe,le,ut="Information about an organization linked to a user logged in with OAuth.",Ce,S,Ue,O,D,Se,ge,ht="Information about a user logged in with OAuth.",ke,Y,Je,w,z,De,ue,ct="Information about the OAuth login.",Be,K,Ze,he,Fe;return y=new $t({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),A=new T({props:{title:"OAuth and FastAPI",local:"oauth-and-fastapi",headingTag:"h1"}}),E=new T({props:{title:"Hugging Face OAuth Integration in FastAPI",local:"hugging-face-oauth-integration-in-fastapi",headingTag:"h1"}}),H=new T({props:{title:"OAuth Overview",local:"oauth-overview",headingTag:"h2"}}),V=new T({props:{title:"How to use it?",local:"how-to-use-it",headingTag:"h3"}}),G=new pt({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMGF0dGFjaF9odWdnaW5nZmFjZV9vYXV0aCUyQyUyMHBhcnNlX2h1Z2dpbmdmYWNlX29hdXRoJTBBZnJvbSUyMGZhc3RhcGklMjBpbXBvcnQlMjBGYXN0QVBJJTJDJTIwUmVxdWVzdCUwQSUwQWFwcCUyMCUzRCUyMEZhc3RBUEkoKSUwQWF0dGFjaF9odWdnaW5nZmFjZV9vYXV0aChhcHApJTBBJTBBJTQwYXBwLmdldCglMjIlMkYlMjIpJTBBZGVmJTIwZ3JlZXRfanNvbihyZXF1ZXN0JTNBJTIwUmVxdWVzdCklM0ElMEElMjAlMjAlMjAlMjBvYXV0aF9pbmZvJTIwJTNEJTIwcGFyc2VfaHVnZ2luZ2ZhY2Vfb2F1dGgocmVxdWVzdCklMEElMjAlMjAlMjAlMjBpZiUyMG9hdXRoX2luZm8lMjBpcyUyME5vbmUlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMjJtc2clMjIlM0ElMjAlMjJOb3QlMjBsb2dnZWQlMjBpbiElMjIlN0QlMEElMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMjJtc2clMjIlM0ElMjBmJTIySGVsbG8lMkMlMjAlN0JvYXV0aF9pbmZvLnVzZXJfaW5mby5wcmVmZXJyZWRfdXNlcm5hbWUlN0QhJTIyJTdE",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> attach_huggingface_oauth, parse_huggingface_oauth
<span class="hljs-keyword">from</span> fastapi <span class="hljs-keyword">import</span> FastAPI, Request

app = FastAPI()
attach_huggingface_oauth(app)

<span class="hljs-meta">@app.get(<span class="hljs-params"><span class="hljs-string">&quot;/&quot;</span></span>)</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">greet_json</span>(<span class="hljs-params">request: Request</span>):
    oauth_info = parse_huggingface_oauth(request)
    <span class="hljs-keyword">if</span> oauth_info <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>:
        <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;msg&quot;</span>: <span class="hljs-string">&quot;Not logged in!&quot;</span>}
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;msg&quot;</span>: <span class="hljs-string">f&quot;Hello, <span class="hljs-subst">{oauth_info.user_info.preferred_username}</span>!&quot;</span>}`,wrap:!1}}),P=new T({props:{title:"attach_huggingface_oauth",local:"huggingface_hub.attach_huggingface_oauth",headingTag:"h3"}}),W=new ce({props:{name:"huggingface_hub.attach_huggingface_oauth",anchor:"huggingface_hub.attach_huggingface_oauth",parameters:[{name:"app",val:": fastapi.FastAPI"},{name:"route_prefix",val:": str = '/'"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_oauth.py#L124"}}),U=new jt({props:{anchor:"huggingface_hub.attach_huggingface_oauth.example",$$slots:{default:[At]},$$scope:{ctx:pe}}}),L=new T({props:{title:"parse_huggingface_oauth",local:"huggingface_hub.parse_huggingface_oauth",headingTag:"h3"}}),R=new ce({props:{name:"huggingface_hub.parse_huggingface_oauth",anchor:"huggingface_hub.parse_huggingface_oauth",parameters:[{name:"request",val:": fastapi.Request"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_oauth.py#L191"}}),N=new T({props:{title:"OAuthOrgInfo",local:"huggingface_hub.OAuthOrgInfo",headingTag:"h3"}}),Q=new ce({props:{name:"class huggingface_hub.OAuthOrgInfo",anchor:"huggingface_hub.OAuthOrgInfo",parameters:[{name:"sub",val:": str"},{name:"name",val:": str"},{name:"preferred_username",val:": str"},{name:"picture",val:": str"},{name:"is_enterprise",val:": bool"},{name:"can_pay",val:": typing.Optional[bool] = None"},{name:"role_in_org",val:": typing.Optional[str] = None"},{name:"security_restrictions",val:": typing.Optional[list[typing.Literal['ip', 'token-policy', 'mfa', 'sso']]] = None"}],parametersDescription:[{anchor:"huggingface_hub.OAuthOrgInfo.sub",description:`<strong>sub</strong> (<code>str</code>) &#x2014;
Unique identifier for the org. OpenID Connect field.`,name:"sub"},{anchor:"huggingface_hub.OAuthOrgInfo.name",description:`<strong>name</strong> (<code>str</code>) &#x2014;
The org&#x2019;s full name. OpenID Connect field.`,name:"name"},{anchor:"huggingface_hub.OAuthOrgInfo.preferred_username",description:`<strong>preferred_username</strong> (<code>str</code>) &#x2014;
The org&#x2019;s username. OpenID Connect field.`,name:"preferred_username"},{anchor:"huggingface_hub.OAuthOrgInfo.picture",description:`<strong>picture</strong> (<code>str</code>) &#x2014;
The org&#x2019;s profile picture URL. OpenID Connect field.`,name:"picture"},{anchor:"huggingface_hub.OAuthOrgInfo.is_enterprise",description:`<strong>is_enterprise</strong> (<code>bool</code>) &#x2014;
Whether the org is an enterprise org. Hugging Face field.`,name:"is_enterprise"},{anchor:"huggingface_hub.OAuthOrgInfo.can_pay",description:`<strong>can_pay</strong> (<code>Optional[bool]</code>, <em>optional</em>) &#x2014;
Whether the org has a payment method set up. Hugging Face field.`,name:"can_pay"},{anchor:"huggingface_hub.OAuthOrgInfo.role_in_org",description:`<strong>role_in_org</strong> (<code>Optional[str]</code>, <em>optional</em>) &#x2014;
The user&#x2019;s role in the org. Hugging Face field.`,name:"role_in_org"},{anchor:"huggingface_hub.OAuthOrgInfo.security_restrictions",description:`<strong>security_restrictions</strong> (<code>Optional[list[Literal[&quot;ip&quot;, &quot;token-policy&quot;, &quot;mfa&quot;, &quot;sso&quot;]]]</code>, <em>optional</em>) &#x2014;
Array of security restrictions that the user hasn&#x2019;t completed for this org. Possible values: &#x201C;ip&#x201D;, &#x201C;token-policy&#x201D;, &#x201C;mfa&#x201D;, &#x201C;sso&#x201D;. Hugging Face field.`,name:"security_restrictions"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_oauth.py#L23"}}),S=new T({props:{title:"OAuthUserInfo",local:"huggingface_hub.OAuthUserInfo",headingTag:"h3"}}),D=new ce({props:{name:"class huggingface_hub.OAuthUserInfo",anchor:"huggingface_hub.OAuthUserInfo",parameters:[{name:"sub",val:": str"},{name:"name",val:": str"},{name:"preferred_username",val:": str"},{name:"email_verified",val:": typing.Optional[bool]"},{name:"email",val:": typing.Optional[str]"},{name:"picture",val:": str"},{name:"profile",val:": str"},{name:"website",val:": typing.Optional[str]"},{name:"is_pro",val:": bool"},{name:"can_pay",val:": typing.Optional[bool]"},{name:"orgs",val:": typing.Optional[list[huggingface_hub._oauth.OAuthOrgInfo]]"}],parametersDescription:[{anchor:"huggingface_hub.OAuthUserInfo.sub",description:`<strong>sub</strong> (<code>str</code>) &#x2014;
Unique identifier for the user, even in case of rename. OpenID Connect field.`,name:"sub"},{anchor:"huggingface_hub.OAuthUserInfo.name",description:`<strong>name</strong> (<code>str</code>) &#x2014;
The user&#x2019;s full name. OpenID Connect field.`,name:"name"},{anchor:"huggingface_hub.OAuthUserInfo.preferred_username",description:`<strong>preferred_username</strong> (<code>str</code>) &#x2014;
The user&#x2019;s username. OpenID Connect field.`,name:"preferred_username"},{anchor:"huggingface_hub.OAuthUserInfo.email_verified",description:`<strong>email_verified</strong> (<code>Optional[bool]</code>, <em>optional</em>) &#x2014;
Indicates if the user&#x2019;s email is verified. OpenID Connect field.`,name:"email_verified"},{anchor:"huggingface_hub.OAuthUserInfo.email",description:`<strong>email</strong> (<code>Optional[str]</code>, <em>optional</em>) &#x2014;
The user&#x2019;s email address. OpenID Connect field.`,name:"email"},{anchor:"huggingface_hub.OAuthUserInfo.picture",description:`<strong>picture</strong> (<code>str</code>) &#x2014;
The user&#x2019;s profile picture URL. OpenID Connect field.`,name:"picture"},{anchor:"huggingface_hub.OAuthUserInfo.profile",description:`<strong>profile</strong> (<code>str</code>) &#x2014;
The user&#x2019;s profile URL. OpenID Connect field.`,name:"profile"},{anchor:"huggingface_hub.OAuthUserInfo.website",description:`<strong>website</strong> (<code>Optional[str]</code>, <em>optional</em>) &#x2014;
The user&#x2019;s website URL. OpenID Connect field.`,name:"website"},{anchor:"huggingface_hub.OAuthUserInfo.is_pro",description:`<strong>is_pro</strong> (<code>bool</code>) &#x2014;
Whether the user is a pro user. Hugging Face field.`,name:"is_pro"},{anchor:"huggingface_hub.OAuthUserInfo.can_pay",description:`<strong>can_pay</strong> (<code>Optional[bool]</code>, <em>optional</em>) &#x2014;
Whether the user has a payment method set up. Hugging Face field.`,name:"can_pay"},{anchor:"huggingface_hub.OAuthUserInfo.orgs",description:`<strong>orgs</strong> (<code>Optional[list[OrgInfo]]</code>, <em>optional</em>) &#x2014;
List of organizations the user is part of. Hugging Face field.`,name:"orgs"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_oauth.py#L57"}}),Y=new T({props:{title:"OAuthInfo",local:"huggingface_hub.OAuthInfo",headingTag:"h3"}}),z=new ce({props:{name:"class huggingface_hub.OAuthInfo",anchor:"huggingface_hub.OAuthInfo",parameters:[{name:"access_token",val:": str"},{name:"access_token_expires_at",val:": datetime"},{name:"user_info",val:": OAuthUserInfo"},{name:"state",val:": typing.Optional[str]"},{name:"scope",val:": str"}],parametersDescription:[{anchor:"huggingface_hub.OAuthInfo.access_token",description:`<strong>access_token</strong> (<code>str</code>) &#x2014;
The access token.`,name:"access_token"},{anchor:"huggingface_hub.OAuthInfo.access_token_expires_at",description:`<strong>access_token_expires_at</strong> (<code>datetime.datetime</code>) &#x2014;
The expiration date of the access token.`,name:"access_token_expires_at"},{anchor:"huggingface_hub.OAuthInfo.user_info",description:`<strong>user_info</strong> (<a href="/docs/huggingface_hub/main/en/package_reference/oauth#huggingface_hub.OAuthUserInfo">OAuthUserInfo</a>) &#x2014;
The user information.`,name:"user_info"},{anchor:"huggingface_hub.OAuthInfo.state",description:`<strong>state</strong> (<code>str</code>, <em>optional</em>) &#x2014;
State passed to the OAuth provider in the original request to the OAuth provider.`,name:"state"},{anchor:"huggingface_hub.OAuthInfo.scope",description:`<strong>scope</strong> (<code>str</code>) &#x2014;
Granted scope.`,name:"scope"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_oauth.py#L100"}}),K=new yt({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/oauth.md"}}),{c(){d=i("meta"),J=s(),v=i("p"),j=s(),u(y.$$.fragment),g=s(),u(A.$$.fragment),fe=s(),B=i("p"),B.textContent=Ye,me=s(),Z=i("ul"),Z.innerHTML=ze,de=s(),F=i("p"),F.textContent=Ke,_e=s(),u(E.$$.fragment),be=s(),X=i("p"),X.textContent=et,Me=s(),u(H.$$.fragment),$e=s(),q=i("p"),q.innerHTML=tt,je=s(),u(V.$$.fragment),ye=s(),u(G.$$.fragment),Ae=s(),C=i("blockquote"),C.innerHTML=nt,ve=s(),u(P.$$.fragment),Ie=s(),b=i("div"),u(W.$$.fragment),qe=s(),te=i("p"),te.textContent=at,Ve=s(),ne=i("p"),ne.textContent=st,Ge=s(),ae=i("ul"),ae.innerHTML=ot,Pe=s(),u(U.$$.fragment),xe=s(),u(L.$$.fragment),Oe=s(),M=i("div"),u(R.$$.fragment),We=s(),se=i("p"),se.innerHTML=it,Le=s(),oe=i("p"),oe.innerHTML=rt,Re=s(),ie=i("p"),ie.innerHTML=lt,Ne=s(),re=i("p"),re.innerHTML=gt,we=s(),u(N.$$.fragment),Te=s(),x=i("div"),u(Q.$$.fragment),Qe=s(),le=i("p"),le.textContent=ut,Ce=s(),u(S.$$.fragment),Ue=s(),O=i("div"),u(D.$$.fragment),Se=s(),ge=i("p"),ge.textContent=ht,ke=s(),u(Y.$$.fragment),Je=s(),w=i("div"),u(z.$$.fragment),De=s(),ue=i("p"),ue.textContent=ct,Be=s(),u(K.$$.fragment),Ze=s(),he=i("p"),this.h()},l(e){const t=Mt("svelte-u9bgzb",document.head);d=r(t,"META",{name:!0,content:!0}),t.forEach(n),J=o(e),v=r(e,"P",{}),ee(v).forEach(n),j=o(e),h(y.$$.fragment,e),g=o(e),h(A.$$.fragment,e),fe=o(e),B=r(e,"P",{"data-svelte-h":!0}),_(B)!=="svelte-1jlhota"&&(B.textContent=Ye),me=o(e),Z=r(e,"UL",{"data-svelte-h":!0}),_(Z)!=="svelte-12skaqt"&&(Z.innerHTML=ze),de=o(e),F=r(e,"P",{"data-svelte-h":!0}),_(F)!=="svelte-tww4as"&&(F.textContent=Ke),_e=o(e),h(E.$$.fragment,e),be=o(e),X=r(e,"P",{"data-svelte-h":!0}),_(X)!=="svelte-1jzflbu"&&(X.textContent=et),Me=o(e),h(H.$$.fragment,e),$e=o(e),q=r(e,"P",{"data-svelte-h":!0}),_(q)!=="svelte-sqe3e6"&&(q.innerHTML=tt),je=o(e),h(V.$$.fragment,e),ye=o(e),h(G.$$.fragment,e),Ae=o(e),C=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),_(C)!=="svelte-m9j9lg"&&(C.innerHTML=nt),ve=o(e),h(P.$$.fragment,e),Ie=o(e),b=r(e,"DIV",{class:!0});var $=ee(b);h(W.$$.fragment,$),qe=o($),te=r($,"P",{"data-svelte-h":!0}),_(te)!=="svelte-m9n3hj"&&(te.textContent=at),Ve=o($),ne=r($,"P",{"data-svelte-h":!0}),_(ne)!=="svelte-1rqu6lm"&&(ne.textContent=st),Ge=o($),ae=r($,"UL",{"data-svelte-h":!0}),_(ae)!=="svelte-iazu9p"&&(ae.innerHTML=ot),Pe=o($),h(U.$$.fragment,$),$.forEach(n),xe=o(e),h(L.$$.fragment,e),Oe=o(e),M=r(e,"DIV",{class:!0});var I=ee(M);h(R.$$.fragment,I),We=o(I),se=r(I,"P",{"data-svelte-h":!0}),_(se)!=="svelte-1gau830"&&(se.innerHTML=it),Le=o(I),oe=r(I,"P",{"data-svelte-h":!0}),_(oe)!=="svelte-4ig96s"&&(oe.innerHTML=rt),Re=o(I),ie=r(I,"P",{"data-svelte-h":!0}),_(ie)!=="svelte-1ux1b45"&&(ie.innerHTML=lt),Ne=o(I),re=r(I,"P",{"data-svelte-h":!0}),_(re)!=="svelte-clgwg2"&&(re.innerHTML=gt),I.forEach(n),we=o(e),h(N.$$.fragment,e),Te=o(e),x=r(e,"DIV",{class:!0});var Ee=ee(x);h(Q.$$.fragment,Ee),Qe=o(Ee),le=r(Ee,"P",{"data-svelte-h":!0}),_(le)!=="svelte-ur89v"&&(le.textContent=ut),Ee.forEach(n),Ce=o(e),h(S.$$.fragment,e),Ue=o(e),O=r(e,"DIV",{class:!0});var Xe=ee(O);h(D.$$.fragment,Xe),Se=o(Xe),ge=r(Xe,"P",{"data-svelte-h":!0}),_(ge)!=="svelte-1lrcldb"&&(ge.textContent=ht),Xe.forEach(n),ke=o(e),h(Y.$$.fragment,e),Je=o(e),w=r(e,"DIV",{class:!0});var He=ee(w);h(z.$$.fragment,He),De=o(He),ue=r(He,"P",{"data-svelte-h":!0}),_(ue)!=="svelte-1ysqsmg"&&(ue.textContent=ct),He.forEach(n),Be=o(e),h(K.$$.fragment,e),Ze=o(e),he=r(e,"P",{}),ee(he).forEach(n),this.h()},h(){k(d,"name","hf:doc:metadata"),k(d,"content",It),k(C,"class","tip"),k(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,d),a(e,J,t),a(e,v,t),a(e,j,t),c(y,e,t),a(e,g,t),c(A,e,t),a(e,fe,t),a(e,B,t),a(e,me,t),a(e,Z,t),a(e,de,t),a(e,F,t),a(e,_e,t),c(E,e,t),a(e,be,t),a(e,X,t),a(e,Me,t),c(H,e,t),a(e,$e,t),a(e,q,t),a(e,je,t),c(V,e,t),a(e,ye,t),c(G,e,t),a(e,Ae,t),a(e,C,t),a(e,ve,t),c(P,e,t),a(e,Ie,t),a(e,b,t),c(W,b,null),l(b,qe),l(b,te),l(b,Ve),l(b,ne),l(b,Ge),l(b,ae),l(b,Pe),c(U,b,null),a(e,xe,t),c(L,e,t),a(e,Oe,t),a(e,M,t),c(R,M,null),l(M,We),l(M,se),l(M,Le),l(M,oe),l(M,Re),l(M,ie),l(M,Ne),l(M,re),a(e,we,t),c(N,e,t),a(e,Te,t),a(e,x,t),c(Q,x,null),l(x,Qe),l(x,le),a(e,Ce,t),c(S,e,t),a(e,Ue,t),a(e,O,t),c(D,O,null),l(O,Se),l(O,ge),a(e,ke,t),c(Y,e,t),a(e,Je,t),a(e,w,t),c(z,w,null),l(w,De),l(w,ue),a(e,Be,t),c(K,e,t),a(e,Ze,t),a(e,he,t),Fe=!0},p(e,[t]){const $={};t&2&&($.$$scope={dirty:t,ctx:e}),U.$set($)},i(e){Fe||(p(y.$$.fragment,e),p(A.$$.fragment,e),p(E.$$.fragment,e),p(H.$$.fragment,e),p(V.$$.fragment,e),p(G.$$.fragment,e),p(P.$$.fragment,e),p(W.$$.fragment,e),p(U.$$.fragment,e),p(L.$$.fragment,e),p(R.$$.fragment,e),p(N.$$.fragment,e),p(Q.$$.fragment,e),p(S.$$.fragment,e),p(D.$$.fragment,e),p(Y.$$.fragment,e),p(z.$$.fragment,e),p(K.$$.fragment,e),Fe=!0)},o(e){f(y.$$.fragment,e),f(A.$$.fragment,e),f(E.$$.fragment,e),f(H.$$.fragment,e),f(V.$$.fragment,e),f(G.$$.fragment,e),f(P.$$.fragment,e),f(W.$$.fragment,e),f(U.$$.fragment,e),f(L.$$.fragment,e),f(R.$$.fragment,e),f(N.$$.fragment,e),f(Q.$$.fragment,e),f(S.$$.fragment,e),f(D.$$.fragment,e),f(Y.$$.fragment,e),f(z.$$.fragment,e),f(K.$$.fragment,e),Fe=!1},d(e){e&&(n(J),n(v),n(j),n(g),n(fe),n(B),n(me),n(Z),n(de),n(F),n(_e),n(be),n(X),n(Me),n($e),n(q),n(je),n(ye),n(Ae),n(C),n(ve),n(Ie),n(b),n(xe),n(Oe),n(M),n(we),n(Te),n(x),n(Ce),n(Ue),n(O),n(ke),n(Je),n(w),n(Be),n(Ze),n(he)),n(d),m(y,e),m(A,e),m(E,e),m(H,e),m(V,e),m(G,e),m(P,e),m(W),m(U),m(L,e),m(R),m(N,e),m(Q),m(S,e),m(D),m(Y,e),m(z),m(K,e)}}}const It='{"title":"OAuth and FastAPI","local":"oauth-and-fastapi","sections":[],"depth":1}';function xt(pe){return mt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Bt extends _t{constructor(d){super(),bt(this,d,xt,vt,ft,{})}}export{Bt as component};
