-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop app: Authenticate with OAuth #98345
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~553 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~9258 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
2b1e066
to
d4118b2
Compare
8d1694e
to
5131d32
Compare
isSingleInstance() was only called in one place (so we inlined it), and anotherInstanceStarted() was unused.
And exit immediately when not the first instance.
45d00f8
to
1c9f51f
Compare
1c9f51f
to
2f10338
Compare
WIP
Related to #89736 #72754 #55611
Proposed Changes
This PR makes it so that logging into the Desktop app happens in the user's external browser, instead of directly in the app. So, instead of the Desktop app showing calypso's login screen, it shows just a button that when clicked opens calypso's login screen in the user's browser.
Once the user has completed login in their browser, they are redirected to the desktop app, through a URL that carries the
access_token
, e.g.:The access token is then used to log in the user in the Desktop app.
Why are these changes being made?
Currently the desktop app is unusable for users who, for example, have passkeys. There are also other cases where login in desktop app is broken, see linked issues above. Doing the login externally instead of directly in the desktop app would fix all these issues.
Prior analysis on this has been done in p1717608504988349-slack-C029GN3KD and pdKhl6-49R-p2.
Screen recording
Screen.Recording.2025-01-16.at.16.39.49.mov
References
TODO
${protocol}://
(electron protocol handling)${protocol}://auth
URLs, store the access token, and redirect calypso to/
client_id
for Desktop app (currently using Studio's)Testing Instructions
TODO
Pre-merge Checklist