<!DOCTYPE html>
<html>
  <head>
    <script>
      function loadHandler() {
        if (opener) {
          if (location.hash) {
            // opener.console.log("oauth callback href:", location.href);
            if (typeof opener.require === "function" && opener.require("esri/kernel")) {
              opener.require("esri/kernel").id.setOAuthResponseHash(location.hash);
            } else {
              opener.dispatchEvent(new CustomEvent("arcgis:auth:hash", { detail: location.hash }));
            }
            close();
          }
        } else {
          close();
        }
      }
    </script>
  </head>
  <body onload="loadHandler();"></body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <script>
      function loadHandler() {
        if (opener) {
          if (location.hash) {
            // opener.console.log("oauth callback href:", location.href);
            if (typeof opener.require === "function" && opener.require("esri/kernel")) {
              opener.require("esri/kernel").id.setOAuthResponseHash(location.hash);
            } else {
              opener.dispatchEvent(new CustomEvent("arcgis:auth:hash", { detail: location.hash }));
            }
            close();
          } else if (location.search) {
            opener.dispatchEvent(new CustomEvent("arcgis:auth:location:search", { detail: location.search }));
            close();
          }
        } else {
          close();
        }
      }
    </script>
  </head>
  <body onload="loadHandler();"></body>
</html>

Add support for when `OAuthInfo.flowType` is set to "authorization-code"
Add support for when `OAuthInfo.flowType` is set to "authorization-code"
