function showGetTokenScreen(oauthValidationCallback, authUrl) {
  initScreenFlag = 0;

  mainArea.innerHTML = `
    <div class="fade-in-from-bottom">
      <span
        style="
          display: none;
          cursor: default;
          font-size: 17px;
          padding: 5px 10px;
          background: ${
            getComputedStyle(
              document.documentElement,
            ).getPropertyValue('--color-fg')
          }22;
          opacity: 0.502;
          vertical-align: middle;
          border-radius: 5px;
          position: absolute;
          top: 32px;
          right: 42%;
        "

        id="countdown"
      >
        Countdown timer
      </span>
      <div class="no-auth-grid" name="get-token" style="margin-top: 60px;">
        <div class="no-auth-grid-icon">
          <img src="../res/auth.svg" alt="Auth" />
        </div>
        <div class="no-auth-grid-info">
          <div style="font-size: 35px;">
            Get token!
          </div>

          <div style="
            margin-top: 12px;
            opacity: 0.502;
          ">
            A new browser window is being opened.
            Login/Select a Google account, accept the permissions and paste the authentication code below.
          </div>

          <input
            id="auth-code-input"
            class="config-input"
            placeholder="Paste the code..."
            style="margin-top: 20px;"
          />

          <a
            onclick="openLink('https://github.com/Melvin-Abraham/Google-Assistant-Unofficial-Desktop-Client/wiki/Setup-Authentication-for-Google-Assistant-Unofficial-Desktop-Client#configure-credentials')"
            name="configure-creds-link"
            style="
              display: none;
              font-size: 16px;
              margin-top: 24px;
              color: var(--color-accent);
            "
          >
              Read updated Credential Configuration Guide
          </a>
        </div>
      </div>
    </div>
  `;

  suggestionArea.innerHTML = '<div class="suggestion-parent"></div>';
  const suggestionParent = document.querySelector('.suggestion-parent');

  suggestionParent.innerHTML = `
    <div id="submit-btn" class="suggestion">
      <span>
        <img src="../res/done.svg" style="
          height: 20px;
          width: 20px;
          vertical-align: top;
          padding-right: 5px;"
        >
      </span>
      Submit
    </div>

    <div id="open-settings-btn" class="suggestion" onclick="openConfig()">
      Open Settings
    </div>

    <div id="browser-open-failed-btn" class="suggestion">
      Browser didn't open
    </div>
  `;

  suggestionArea.querySelector('#browser-open-failed-btn').onclick = () => {
    const result = displayDialog({
      type: 'info',
      message: 'Your Browser failed to open the link?',
      detail: [
        'You may try the following:',
        '',
        '1. Check if your browser is minimized. It is possible that your browser did open the link but didn\'t show up in foreground.',
        '2. If that\'s not the case, you may try opening the link again by clicking on "Retry"',
        '3. If none of these work, you may copy the auth link and paste it manually in the browser.',
      ].join('\n'),
      buttons: [
        'Copy Auth Link',
        'Retry',
        'Close',
      ],
      cancelId: 2,
    });

    switch (result) {
      case 0:
        electron.clipboard.writeText(authUrl);
        break;

      case 1:
        electronShell.openExternal(authUrl);
        break;

      default:
        // no-op
    }
  };

  suggestionArea.querySelector('#submit-btn').onclick = () => {
    const isAuthCodeProcessingInProgress = document
      .querySelector('.no-auth-grid')
      .classList.contains('disabled');

    if (isAuthCodeProcessingInProgress) {
      console.log("Can't submit while receiving tokens...");
      return;
    }

    const oauthInput = mainArea.querySelector('#auth-code-input');
    const oauthCode = oauthInput.value;

    oauthInput.onchange = () => {
      markInputAsValid(oauthInput);
    };

    if (!oauthCode) {
      markInputAsInvalid(oauthInput, true);
      return;
    }

    document.querySelector('#loader-area').innerHTML = `
      <div class="determinate-progress progress-countdown-ten-secs"></div>
    `;

    // Disable suggestions

    document.querySelector('.no-auth-grid').classList.add('disabled');
    document.querySelector('#submit-btn').classList.add('disabled');
    document.querySelector('#open-settings-btn').classList.add('disabled');
    document.querySelector('#open-settings-btn').onclick = '';

    // Init. Countdown

    document.querySelector('#countdown').style.display = 'unset';
    document.querySelector('#countdown').innerHTML = 'Please wait for 10s';
    let secs = 9;

    const countdownIntervalId = setInterval(() => {
      if (secs === 0) {
        document.querySelector('#loader-area').innerHTML = '';
        document.querySelector('.no-auth-grid').classList.remove('disabled');
        document.querySelector('#countdown').style.display = 'none';

        let tokensString;

        try {
          tokensString = fs.readFileSync(config.auth.savedTokensPath);
        }
        catch (error) {
          // If file doesn't exist

          console.group(...consoleMessage(
            'Error occurred while saving tokens',
            'error',
          ));
          console.error(error);
          console.groupEnd();

          tokensString = '';
        }

        if (tokensString.length) {
          // Tokens were saved

          console.groupCollapsed(...consoleMessage('Tokens saved'));
          console.log(tokensString);
          console.groupEnd();

          displayQuickMessage('Tokens saved', true);

          setTimeout(() => {
            displayErrorScreen({
              icon: {
                path: '../res/refresh.svg',
                style: `
                  height: 100px;
                  animation: rotate_anim 600ms cubic-bezier(0.48, -0.4, 0.26, 1.3);
                  ${getEffectiveTheme() === 'light' ? 'filter: invert(1);' : ''}
                `,
              },
              title: 'Relaunch Required',
              details: 'A relaunch is required for changes to take place',
              subdetails: 'Info: Tokens saved',
            });

            // eslint-disable-next-line no-shadow
            const suggestionParent = document.querySelector('.suggestion-parent');

            suggestionParent.innerHTML = `
              <div class="suggestion" onclick="relaunchAssistant()">
                <span>
                  <img src="../res/refresh.svg" style="
                    height: 20px;
                    width: 20px;
                    vertical-align: top;
                    padding-right: 5px;
                    ${getEffectiveTheme() === 'light' ? 'filter: invert(1);' : ''}"
                  >
                </span>
                Relaunch Assistant
              </div>
            `;
          }, 1000);
        }
        else {
          // Failed to save tokens

          displayErrorScreen({
            title: 'Failed to get Tokens',
            details:
              'Assistant failed to fetch the tokens from server. Either the auth code is invalid or the rate limit might have exceeded.<br>Try selecting a different Google Account.',
            subdetails: 'Error: Error getting tokens',
            customStyle: 'top: 80px;',
          });

          suggestionParent.innerHTML = `
            <div class="suggestion" onclick="openConfig()">
              <span>
                <img src="../res/settings.svg" style="
                  height: 20px;
                  width: 20px;
                  vertical-align: top;
                  padding-right: 10px;
                  ${getEffectiveTheme() === 'light' ? 'filter: invert(1);' : ''}"
                >
              </span>
              Open Settings
            </div>
            <div class="suggestion" id="oauth-retry-btn">
              Retry
            </div>
          `;
        }

        document.querySelector('#oauth-retry-btn').onclick = () => {
          showGetTokenScreen(oauthValidationCallback);
        };

        clearInterval(countdownIntervalId);
      }

      document.querySelector('#countdown').innerHTML = `Please wait for ${secs}s`;
      secs--;
    }, 1000);

    try {
      oauthValidationCallback(oauthCode);
    }
    catch (error) {
      console.group(...consoleMessage('Error fetching tokens', 'error'));
      console.error(error);
      console.groupEnd();

      displayErrorScreen({
        title: 'Failed to get Tokens',
        details:
          'Due to some unexpected exception, assistant failed to get the tokens from server.',
        subdetails: 'Error: Error getting tokens',
      });

      suggestionParent.innerHTML = `
        <div class="suggestion" id="oauth-retry-btn">
          Retry
        </div>
      `;

      document.querySelector('#oauth-retry-btn').onclick = () => {
        showGetTokenScreen(oauthValidationCallback);
      };
    }
  };

  // Show the user new link to configure credential guide
  // if not already using updated oauth key file
  if (fs.existsSync(config.auth.keyFilePath)) {
    const oauthKey = JSON.parse(fs.readFileSync(config.auth.keyFilePath));

    // Check if the oauth key file uses old redirect URI or type
    const isOldKeyFile = (
      oauthKey.web === undefined
      || !oauthKey.web.redirect_uris[0].startsWith('http://localhost:5754')
    );

    if (isOldKeyFile) {
      const configureCredsGuideLink = document.querySelector('a[name=configure-creds-link]');
      configureCredsGuideLink.style.display = 'block';

      const getTokenView = document.querySelector('[name=get-token]');
      getTokenView.style.marginTop = '30px';
    }
  }
}
Display the "Get Token" screen if no tokens are found.

_(Call is initiated by the Google Assistant auth library)_

@param {function} oauthValidationCallback
The callback to process the OAuth Code.

@param {string} authUrl
The URL for getting auth code for a Google Account
_(Typically to be used when the browser fails to open)_