iPolloWork icon indicating copy to clipboard operation
iPolloWork copied to clipboard

[Bug]: Windows: local Cloud signup cannot return to the development desktop app

Open yuuu125 opened this issue 4 months ago • 1 comments

Summary

On Windows, signup through a local iPolloCloud instance succeeds, but the browser remains indefinitely on Connecting to iPolloWork….

Cloud successfully creates the desktop handoff grant, but Windows has no registered ipollowork:// handler for the development Electron build, so the external browser cannot return the grant to the running desktop app.

The protocol is currently registered only when app.isPackaged is true. The in-app browser supports intercepting the deep link, but this flow opens the system browser.

To Reproduce

  1. Start local iPolloCloud at http://localhost:3100.

  2. Start iPolloWork:

    pnpm.cmd dev:cloud http://localhost:3100
    
  3. Click Sign in in the development desktop app.

  4. Register an account in the system browser.

  5. Observe the browser at /register?desktopAuth=1&desktopScheme=ipollowork.

  6. The page remains indefinitely on Connecting to iPolloWork….

Expected behavior

Expected behavior

After registration, Cloud should create a one-time desktop handoff grant and open an ipollowork://den-auth?... callback.

The running development Electron app should receive the callback, exchange the grant, and complete desktop sign-in. Development authentication should not interfere with the installed production app's protocol handler.

Actual behavior

Account registration and desktop handoff grant creation both succeed:

  • POST /api/auth/sign-up/email returns 200
  • POST /api/v1/auth/desktop-handoff returns 200

However, the callback is never delivered to the Electron development app, and the browser remains indefinitely on Connecting to iPolloWork….

The desktop currently registers the ipollowork:// protocol only for packaged builds:

if (app.isPackaged) {
  app.setAsDefaultProtocolClient(DESKTOP_PROTOCOL_SCHEME);
}

### Screenshots (optional)

_No response_

### iPolloWork version & Desktop info (optional)

_No response_

### Additional context (optional)

_No response_

yuuu125 avatar Jul 14 '26 09:07 yuuu125

Temporary workaround

I confirmed that the failure is caused by the missing ipollowork:// protocol handler in the Windows development build.

As a temporary local workaround, I added two Windows scripts:

  • 切到开发版.cmd: registers ipollowork:// for the current development checkout and forwards the callback to the isolated dev:cloud Electron profile.
  • 恢复正式版.cmd: restores the protocol handler to an installed production app. If no production app is found, it exits without changing the registry.

The workaround only modifies:

HKCU\Software\Classes\ipollowork

LunetteLin avatar Jul 14 '26 10:07 LunetteLin