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

Function login

site/src/api/queries/users.ts:183–198  ·  view source on GitHub ↗
(
	authorization: AuthorizationRequest,
	queryClient: QueryClient,
)

Source from the content-addressed store, hash-verified

181};
182
183export const login = (
184 authorization: AuthorizationRequest,
185 queryClient: QueryClient,
186) => {
187 return {
188 mutationFn: async (credentials: { email: string; password: string }) =>
189 loginFn({ ...credentials, authorization }),
190 onSuccess: async (data: Awaited<ReturnType<typeof loginFn>>) => {
191 queryClient.setQueryData(meKey, data.user);
192 queryClient.setQueryData(
193 getAuthorizationKey(authorization),
194 data.permissions,
195 );
196 },
197 };
198};
199
200const loginFn = async ({
201 email,

Callers 1

AuthProviderFunction · 0.90

Calls 2

getAuthorizationKeyFunction · 0.90
loginFnFunction · 0.85

Tested by

no test coverage detected