static/scripts/wp-stateless-setup.js
/**
   * Returns Google API Auth token, either from sessionStorage or from URL, if on settings setup page.
   *
   * wp.stateless.getAccessToken()
   *
   */
Returns Google API Auth token, either from sessionStorage or from URL, if on settings setup page.
Returns Google API Auth token either from sessionStorage or from URL if on settings setup page .
function clearAccessToken() {
    try {
        var title = jQuery('head').find("title").text();
        wp.stateless.access_token = null;
        sessionStorage.removeItem( 'wp.stateless.token' );
        sessionStorage.removeItem( 'wp.stateless.expiry_date' );
        History.replaceState('', title, '?page=stateless-setup&step=google-login');
        return true;
    } catch( error ) {
      console.error( error.message );
    }
    return false;
  }
function clearAccessToken ( ) { try { var title = jQuery ( 'head' ) . find ( "title" ) . text ( ) ; wp . stateless . access_token = null ; sessionStorage . removeItem ( 'wp.stateless.token' ) ; sessionStorage . removeItem ( 'wp.stateless.expiry_date' ) ; History . replaceState ( '' , title , '?page=stateless-setup&step=google-login' ) ; return true ; } catch ( error ) { console . error ( error . message ) ; } return false ; }
Returns Google API Auth token, either from sessionStorage or from URL, if on settings setup page.
Returns Google API Auth token either from sessionStorage or from URL if on settings setup page .