function interactiveSignIn() {
    changeState(STATE_ACQUIRING_AUTHTOKEN);
    console.log('interactiveSignIn');

    // This is the normal flow for authentication/authorization on Google
    // properties. You need to add the oauth2 client_id and scopes to the app
    // manifest. The interactive param indicates if a new window will be opened
    // when the user is not yet authenticated or not.
    //
    // See https://developer.chrome.com/docs/extensions/reference/api/identity#method-getAuthToken
    chrome.identity
      .getAuthToken({ interactive: true })
      .then((token) => {
        displayOutput('Token acquired:\n' + token.token);
        changeState(STATE_AUTHTOKEN_ACQUIRED);
      })
      .catch((error) => {
        displayOutput(error.message);
        changeState(STATE_START);
      });
  }
Retrieves a valid token. Since this is initiated by the user
    clicking in the Sign In button, we want it to be interactive -
    ie, when no token is found, the auth window is presented to the user.

    Observe that the token does not need to be cached by the app.
    Chrome caches tokens and takes care of renewing when it is expired.
    In that sense, getAuthToken only goes to the server if there is
    no cached token or if it is expired. If you want to force a new
    token (for example when user changes the password on the service)
    you need to call removeCachedAuthToken()