MCPcopy Index your code
hub / github.com/coder/coder / useAuthContext

Function useAuthContext

site/src/contexts/auth/AuthProvider.tsx:135–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133};
134
135export const useAuthContext = () => {
136 const context = useContext(AuthContext);
137
138 if (!context) {
139 throw new Error("useAuth should be used inside of <AuthProvider />");
140 }
141
142 return context;
143};

Callers 7

LoginPageFunction · 0.90
AccountPageFunction · 0.90
SetupPageFunction · 0.90
AgentEmbedPageFunction · 0.90
AgentAnalyticsPageFunction · 0.90
RequireAuthFunction · 0.90
useAuthenticatedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected