Skip to content

Commit 0efecbf

Browse files
committed
correctly sending identityId to backend
1 parent 9dd48b9 commit 0efecbf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

example_backend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const verifyAuthentication = async function (interviewId, token, candidate) {
7878
await updateSession(interviewId, "rejected");
7979
return {
8080
// Detailed debug message, in production you might want to avoid exposing internal details.
81-
message: "Token identityId and candidate mismatch for interviewId " + interviewId,
81+
message: "identityId and candidate mismatch for interviewId " + interviewId,
8282
valid: false,
8383
};
8484
}

main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ async function authenticate() {
2424
const hintInput = document.getElementById("user-hint-input");
2525
const userHintDiv = document.getElementById("user-hint-container");
2626
userHintDiv.style.display = "none";
27-
28-
incodeSession = await exampleBackend.start();
29-
renderAuthentication(hintInput.value);
27+
28+
const identityId = hintInput.value;
29+
incodeSession = await exampleBackend.start(identityId);
30+
renderAuthentication(identityId);
3031
}
3132

3233
// 2.- Render the face authentication

0 commit comments

Comments
 (0)