-
Notifications
You must be signed in to change notification settings - Fork 438
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] Add Gitpod to Settings sync #139
Conversation
b4db51b
to
893ec78
Compare
@filiptronicek Could you squash in one commit and rebase on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks promising, but the code structure needs more love. Also I could not find how we invalidate existing tokens. It would be nice to align in these regards with GH auth extension.
70b64bd
to
21220fc
Compare
893ec78
to
21d0094
Compare
8a1b5b2
to
aac06d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, forgot to publish comments several days ago (
if (!enabled) { | ||
try { | ||
await config.update('configurationSync.store', undefined, true); | ||
updateSyncContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not do it here, but listern to configuration changes and react it.
setSettingsSync
should only update config nothing else, side effects should be done via listeners
extensions/gitpod/src/auth.ts
Outdated
|
||
// Wait until a session is added to the context's secret store | ||
const authPromise = promiseFromEvent(context.secrets.onDidChange, (changeEvent: vscode.SecretStorageChangeEvent, resolve, reject): void => { | ||
if (changeEvent.key !== 'gitpod.authSessions') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please introduce a class GitpodAuthSession
which provides methods to set/get/delete and event to indicate when it is changed. gitpod.authSessions
should be a constant within such class and not used by the rest of code
bd3b23a
to
530281e
Compare
c709288
to
bfe99f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some lil typo fixes 😄
530281e
to
8f5ea0d
Compare
8f5ea0d
to
b9033dd
Compare
b9033dd
to
8fd8da4
Compare
c2ca77e
to
93cd03b
Compare
93cd03b
to
11c4bf4
Compare
43829f3
to
d9bb5ea
Compare
e83735d
to
c18201b
Compare
fece1dd
to
a0ddbc9
Compare
3e2ba9b
to
37739b0
Compare
d6a1f58
to
0800cc4
Compare
0800cc4
to
c54bf16
Compare
c23521a
to
7a7d2cc
Compare
7a7d2cc
to
abd22af
Compare
Related to gitpod-io/gitpod#7360 Currently, When the server has a root cert cross-signed by the expired `DST ROOT CA X3`. There's a possiblity of the client having an older version of `electron` in their code that causes the cert expiry failure. While, asking users to update their vs code should be our first suggestion, In some cases using the latest version of `node-fetch` also fixed the issue (not exactly sure why). This PR bumps the `node-fetch` dependency to the one that the `code-server` uses. Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
refactor `createOauth2URL` Add lock changes Rewrite `getSessions` and `removeSession` functions Don't bore the user with expired error Docs Add todo Add get and set functions for stored auth sessions Change oauth2 creation function and update clientID to be up to date Have popup preference stored in the global context Handle ws errors Max WS retries
Co-authored-by: bigint <b1gint@protonmail.com>
Co-authored-by: bigint <b1gint@protonmail.com>
a0ddbc9
to
17814a3
Compare
76e0439
to
dedddc6
Compare
continuation in #337 |
Add Gitpod as an authentication and Settings Sync provider via the
gitpod.gitpod-desktop
extension.openExternal
issueBlocked by gitpod-io/gitpod#6272