Skip to content

Accept login-complete on /login so a second account can sign in - #6

Open
webscience2 wants to merge 1 commit into
tirtha4:mainfrom
webscience2:fix-second-account-login
Open

webscience2 wants to merge 1 commit into
tirtha4:mainfrom
webscience2:fix-second-account-login

Conversation

@webscience2

Copy link
Copy Markdown

Problem

OAuth comes back through granola://login-complete (or granola-dev:// when Electron is launched unpackaged). The renderer only accepts that callback while it is on /login-in-progress.

Adding a second account often never leaves /login. The browser returns to the app, and the app logs login-complete-ignored-not-on-login-in-progress and stays on the sign-in screen.

Change

Same-length in-place asar edit as the existing platform patch: treat isLoginInProgressRoute as true for that login-complete guard. The installer fails clearly if the bundled bytes have moved.

Also register x-scheme-handler/granola-dev on the desktop entry. Unpackaged electron /path/to/app.asar uses granola-dev, not granola.

Notes

  • Confirmed against Granola 7.522.2.
  • The minified identifier in the guard (Jsn, c) will change if Granola's bundler output changes; the step exits instead of applying a bad patch.

OAuth returns through granola://login-complete, but the renderer only
handles that callback on /login-in-progress. Adding another account
often stays on /login, so the browser hands the URL back and the app
ignores it.

Same-length asar edit as the existing platform patch. Also register
granola-dev:// for unpackaged Electron launches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant