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

Function loginFn

site/src/api/queries/users.ts:200–218  ·  view source on GitHub ↗
({
	email,
	password,
	authorization,
}: {
	email: string;
	password: string;
	authorization: AuthorizationRequest;
})

Source from the content-addressed store, hash-verified

198};
199
200const loginFn = async ({
201 email,
202 password,
203 authorization,
204}: {
205 email: string;
206 password: string;
207 authorization: AuthorizationRequest;
208}) => {
209 await API.login(email, password);
210 const [user, permissions] = await Promise.all([
211 API.getAuthenticatedUser(),
212 API.checkAuthorization(authorization),
213 ]);
214 return {
215 user,
216 permissions,
217 };
218};
219
220export const logout = (queryClient: QueryClient): MutationOptions => {
221 return {

Callers 1

loginFunction · 0.85

Calls 3

loginMethod · 0.80
allMethod · 0.80
checkAuthorizationMethod · 0.80

Tested by

no test coverage detected