Inline
This commit is contained in:
@@ -90,7 +90,7 @@ const Page = () => {
|
||||
let beginData: BeginPasskeyAuthenticationResponse;
|
||||
|
||||
try {
|
||||
beginData = await beginAuthentication(passkeySessionID);
|
||||
beginData = await beginPasskeyAuthentication(passkeySessionID);
|
||||
} catch (e) {
|
||||
log.error("Couldn't begin passkey authentication", e);
|
||||
setStatus("failed");
|
||||
@@ -127,7 +127,7 @@ const Page = () => {
|
||||
let finishData;
|
||||
|
||||
try {
|
||||
finishData = await finishAuthentication(
|
||||
finishData = await finishPasskeyAuthentication(
|
||||
credential,
|
||||
passkeySessionID,
|
||||
beginData.ceremonySessionID,
|
||||
@@ -147,11 +147,6 @@ const Page = () => {
|
||||
window.location.href = `${redirect}?response=${encodedResponse}`;
|
||||
};
|
||||
|
||||
const beginAuthentication = async (sessionId: string) => {
|
||||
const data = await beginPasskeyAuthentication(sessionId);
|
||||
return data;
|
||||
};
|
||||
|
||||
const getCredential = async (
|
||||
publicKey: any,
|
||||
timeoutMillis: number = 60000, // Default timeout of 60 seconds
|
||||
@@ -176,19 +171,6 @@ const Page = () => {
|
||||
return credential;
|
||||
};
|
||||
|
||||
const finishAuthentication = async (
|
||||
credential: Credential,
|
||||
sessionId: string,
|
||||
ceremonySessionId: string,
|
||||
) => {
|
||||
const data = await finishPasskeyAuthentication(
|
||||
credential,
|
||||
sessionId,
|
||||
ceremonySessionId,
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
void authenticate();
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user