login handler

This commit is contained in:
peintnermax
2024-03-06 14:13:38 +01:00
parent 73fde48e43
commit 482990c281
2 changed files with 41 additions and 48 deletions

View File

@@ -40,32 +40,6 @@ export default function SessionItem({
}
}
// async function loginSession(authRequestId: string, sessionId: string) {
// setLoading(true);
// const res = await fetch(
// "/api/login?" + new URLSearchParams({ sessionId, authRequestId }),
// {
// method: "DELETE",
// headers: {
// "Content-Type": "application/json",
// },
// body: JSON.stringify({
// id: id,
// }),
// }
// );
// const response = await res.json();
// setLoading(false);
// if (!res.ok) {
// // setError(response.details);
// return Promise.reject(response);
// } else {
// return response;
// }
// }
const validPassword = session?.factors?.password?.verifiedAt;
const validPasskey = session?.factors?.webAuthN?.verifiedAt;