Controller/Adminhtml/Studio/Disconnect.php
public function execute()
    {
        try {
            $adminUser = $this->_auth->getUser();

            if ($adminUser->getRefreshToken()) {
                $adminUser->setRefreshToken('')
                    ->save();
            }
            $this->messageManager->addSuccessMessage('Successfully disconnected');
        } catch (\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }

        $this->_redirect('adminhtml/system_config/edit', ['section' => 'connector_developer_settings']);
    }
public function execute()
    {
        try {
            $adminUser = $this->_auth->getUser();

            if ($adminUser->getRefreshToken()) {
                $adminUser->setRefreshToken('')
                    ->save();
            }
            $this->messageManager->addSuccessMessage('Successfully disconnected');
        } catch (\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }

        $this->_redirect('adminhtml/system_config/edit', ['section' => 'connector_developer_settings']);
    }
public function execute ( ) { try { $ adminUser = $ this -> _auth -> getUser ( ) ; if ( $ adminUser -> getRefreshToken ( ) ) { $ adminUser -> setRefreshToken ( '' ) -> save ( ) ; } $ this -> messageManager -> addSuccessMessage ( 'Successfully disconnected' ) ; } catch ( \ Exception $ e ) { $ this -> messageManager -> addErrorMessage ( $ e -> getMessage ( ) ) ; } $ this -> _redirect ( 'adminhtml/system_config/edit' , [ 'section' => 'connector_developer_settings' ] ) ; }
Disconnect and remote the refresh token.

@return void
Disconnect and remote the refresh token .