Skip to content

Commit

Permalink
Fixing demo project makeAssertionOptions.status processing (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasjeit authored Oct 18, 2024
1 parent 0f9f0cb commit 0ea57fd
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/custom.login.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function handleSignInSubmit(event) {
console.log("Assertion Options Object", makeAssertionOptions);

// show options error to user
if (makeAssertionOptions.status !== "ok") {
if (makeAssertionOptions.status === "error") {
console.log("Error creating assertion options");
console.log(makeAssertionOptions.errorMessage);
showErrorAlert(makeAssertionOptions.errorMessage);
Expand Down Expand Up @@ -117,7 +117,7 @@ async function verifyAssertionWithServer(assertedCredential) {
console.log("Assertion Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error doing assertion");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/custom.register.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function handleRegisterSubmit(event) {

console.log("Credential Options Object", makeCredentialOptions);

if (makeCredentialOptions.status !== "ok") {
if (makeCredentialOptions.status === "error") {
console.log("Error creating credential options");
console.log(makeCredentialOptions.errorMessage);
showErrorAlert(makeCredentialOptions.errorMessage);
Expand Down Expand Up @@ -140,7 +140,7 @@ async function registerNewCredential(newCredential) {
console.log("Credential Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error creating credential");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/mfa.login.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function handleSignInSubmit(event) {
console.log("Assertion Options Object", makeAssertionOptions);

// show options error to user
if (makeAssertionOptions.status !== "ok") {
if (makeAssertionOptions.status === "error") {
console.log("Error creating assertion options");
console.log(makeAssertionOptions.errorMessage);
showErrorAlert(makeAssertionOptions.errorMessage);
Expand Down Expand Up @@ -122,7 +122,7 @@ async function verifyAssertionWithServer(assertedCredential) {
console.log("Assertion Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error doing assertion");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/mfa.register.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function handleRegisterSubmit(event) {

console.log("Credential Options Object", makeCredentialOptions);

if (makeCredentialOptions.status !== "ok") {
if (makeCredentialOptions.status === "error") {
console.log("Error creating credential options");
console.log(makeCredentialOptions.errorMessage);
showErrorAlert(makeCredentialOptions.errorMessage);
Expand Down Expand Up @@ -145,7 +145,7 @@ async function registerNewCredential(newCredential) {
console.log("Credential Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error creating credential");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/passwordless.login.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function handleSignInSubmit(event) {
console.log("Assertion Options Object", makeAssertionOptions);

// show options error to user
if (makeAssertionOptions.status !== "ok") {
if (makeAssertionOptions.status === "error") {
console.log("Error creating assertion options");
console.log(makeAssertionOptions.errorMessage);
showErrorAlert(makeAssertionOptions.errorMessage);
Expand Down Expand Up @@ -115,7 +115,7 @@ async function verifyAssertionWithServer(assertedCredential) {
console.log("Assertion Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error doing assertion");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/passwordless.register.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function handleRegisterSubmit(event) {

console.log("Credential Options Object", makeCredentialOptions);

if (makeCredentialOptions.status !== "ok") {
if (makeCredentialOptions.status === "error") {
console.log("Error creating credential options");
console.log(makeCredentialOptions.errorMessage);
showErrorAlert(makeCredentialOptions.errorMessage);
Expand Down Expand Up @@ -142,7 +142,7 @@ async function registerNewCredential(newCredential) {
console.log("Credential Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error creating credential");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/usernameless.login.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function handleSignInSubmit(event) {
console.log("Assertion Options Object", makeAssertionOptions);

// show options error to user
if (makeAssertionOptions.status !== "ok") {
if (makeAssertionOptions.status === "error") {
console.log("Error creating assertion options");
console.log(makeAssertionOptions.errorMessage);
showErrorAlert(makeAssertionOptions.errorMessage);
Expand Down Expand Up @@ -117,7 +117,7 @@ async function verifyAssertionWithServer(assertedCredential) {
console.log("Assertion Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error doing assertion");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions Demo/wwwroot/js/usernameless.register.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function handleRegisterSubmit(event) {

console.log("Credential Options Object", makeCredentialOptions);

if (makeCredentialOptions.status !== "ok") {
if (makeCredentialOptions.status === "error") {
console.log("Error creating credential options");
console.log(makeCredentialOptions.errorMessage);
showErrorAlert(makeCredentialOptions.errorMessage);
Expand Down Expand Up @@ -143,7 +143,7 @@ async function registerNewCredential(newCredential) {
console.log("Credential Object", response);

// show error
if (response.status !== "ok") {
if (response.status === "error") {
console.log("Error creating credential");
console.log(response.errorMessage);
showErrorAlert(response.errorMessage);
Expand Down

0 comments on commit 0ea57fd

Please sign in to comment.