MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / authRequest

Function authRequest

src/Data/UserData.js:44–51  ·  view source on GitHub ↗
(path, body)

Source from the content-addressed store, hash-verified

42async function authRequest(path, body) {
43 return fetch(path, {
44 method: "POST",
45 credentials: "include",
46 headers: {'Content-Type': 'application/json'},
47 ...(body && {body: JSON.stringify(body)}),
48 });
49}
50
51export async function login(email, password) {
52 const normalizedEmail = email.trim().toLowerCase();
53 const username = normalizedEmail.split('@')[0];
54 const response = await authRequest(LOGIN, {email: normalizedEmail, password});

Callers 3

loginFunction · 0.85
registerResetFunction · 0.85
logoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected