SUMMARY After revoking email token within Google account, kmail/akonadictl does not make an effort to open a new auth request in the browser. stdout from `akonadictl`: ``` org.kde.pim.kimap: sasl_client_step failed with: -1 "SASL(0): successful result: " org.kde.kgapi: Bad request QUrl("https://accounts.google.com/o/oauth2/token?prettyPrint=false") , Google replied ' "{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Token has been expired or revoked.\"\n}" ' ``` I found this to be in a do-while loop of line 490 in loginjobs.cpp of the kimap repo (https://invent.kde.org/pim/kimap/-/blob/master/src/loginjob.cpp?ref_type=heads). STEPS TO REPRODUCE 1. Link to gmail in kmail through new email or custom email (IMAP) 2. Somehow it doesn't create a new mail folder and says server unavailable in contrast to being able to connect to gmail, when it could years ago. 3. Remove the identity, recieving, sending of the failed-to-newly add account from kmail settings. 4. Go into accounts.google.com > Third-party apps & services. Revoke KDE's permissions. 5. Try to add gmail account to kmail again as in step 1. 6. Observe the stdout of akonadictl. OBSERVED RESULT "Failed to authenticate additional scopes" shows up in the kmail UI. stdout from `akonadictl`: ``` org.kde.pim.kimap: sasl_client_step failed with: -1 "SASL(0): successful result: " org.kde.kgapi: Bad request QUrl("https://accounts.google.com/o/oauth2/token?prettyPrint=false") , Google replied ' "{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Token has been expired or revoked.\"\n}" ' ``` EXPECTED RESULT Kmail prompts for a new login with Google for the necessary (X)OAuth tokens by opening the browser, such as Firefox. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.5.2 KDE Frameworks Version: 6.19.0 Qt Version: 6.10.0 Kernel Version: 6.17.8-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × 12th Gen Intel® Core™ i5-12400F Memory: 16 GiB of RAM (15.5 GiB usable) Graphics Processor: NVIDIA GeForce RTX 3060 ADDITIONAL INFORMATION $ pacman -Qii akonadi akonadiconsole akonadi-calendar akonadi-contacts akonadi-import-wizard akonadi-mime akonadi-search kmail kmailtransport kmail-account-wizard libsasl | grep - E "(Name|Version)" Name : akonadi Version : 25.08.3-1 Name : akonadiconsole Version : 25.08.3-1 Name : akonadi-calendar Version : 25.08.3-1 Name : akonadi-contacts Version : 25.08.3-1 Name : akonadi-import-wizard Version : 25.08.3-1 Name : akonadi-mime Version : 25.08.3-1 Name : akonadi-search Version : 25.08.3-1 Name : kmail Version : 25.08.3-1 Name : kmailtransport Version : 25.08.3-1 Name : kmail-account-wizard Version : 25.08.3-1 Name : libsasl Version : 2.1.28-5