aad_oauth icon indicating copy to clipboard operation
aad_oauth copied to clipboard

Add AadAuthException to allow selective error handling

Open kubastick opened this issue 3 years ago • 0 comments

This PR allows selective error handling by library consumers. It can be useful in f.e.: handling the back button on the login page:

try {
   await logIn();
} on AadAuthException catch (e) {
  if(e.errorSubcode == "cancel") {
    // User pressed back button on login page, do something
  } else {
    // Other error occurred, do something else
  }
}

kubastick avatar Sep 02 '22 22:09 kubastick