Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(lib/vscode): add log out to application menu #2922

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

Merged
jsjoeio merged 4 commits into main from jsjoeio/add-logout
Mar 23, 2021
Merged

Conversation

Copy link
Contributor

@jsjoeio jsjoeio commented Mar 17, 2021
edited
Loading

This adds a new option to the Application Menu called Log out. It deletes the code-server cookie and logs a user out.

Screenshot

2021年03月17日 15 31 46

TODOs

  • use vscode logger
  • refactor Cookie to be in lib/vscode so we can use it
  • write e2e test
  • refactor Cookie and don't share between lib/vscode

Fixes #778

@jsjoeio jsjoeio added this to the v3.9.2 milestone Mar 17, 2021
@jsjoeio jsjoeio self-assigned this Mar 17, 2021
@jsjoeio jsjoeio marked this pull request as ready for review March 17, 2021 23:23
@jsjoeio jsjoeio requested a review from a team as a code owner March 17, 2021 23:23
@jsjoeio jsjoeio force-pushed the jsjoeio/add-logout branch 2 times, most recently from d77243a to 6a05889 Compare March 17, 2021 23:39
Copy link

@oxy oxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a newline at the end of lib/vscode/src/vs/server/common/cookie.ts should be all that's needed.

Copy link

oxy commented Mar 18, 2021
edited
Loading

So I was wondering why tsc was "failing" to use outDir...

Turns out it was, but since we import from lib/vscode in src now, what used to be out/node/entry.js has now become out/src/node/entry.js (and there's an out/lib/vscode/.../cookie.js).

Since our build script, ./ci/steps/build-code-server.sh looks for out/node/entry.js, it fails.

I think it might be best to just duplicate the key cookie.

jsjoeio reacted with eyes emoji

Copy link
Contributor Author

jsjoeio commented Mar 18, 2021

I think it might be best to just duplicate the key cookie.

Ah okay. Yeah it doesn't seem worth it to have to fix everything else for one thing to not be duplicated 😂 thanks for looking into this! I'll convert to draft and fix!

@jsjoeio jsjoeio marked this pull request as draft March 18, 2021 15:16
@jsjoeio jsjoeio marked this pull request as ready for review March 22, 2021 18:40
@jsjoeio jsjoeio requested a review from oxy March 22, 2021 18:40
Copy link

@oxy oxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jsjoeio jsjoeio force-pushed the jsjoeio/add-logout branch 2 times, most recently from d80bcdf to 7958d52 Compare March 22, 2021 21:10
Copy link
Member

bpmct commented Mar 22, 2021

Love this!

jsjoeio reacted with heart emoji

jsjoeio added 3 commits March 23, 2021 10:02
This adds a new option to the Application Menu called Log out.
It deletes the code-server cookie and logs a user out.
@jsjoeio jsjoeio merged commit 947dd85 into main Mar 23, 2021
@jsjoeio jsjoeio deleted the jsjoeio/add-logout branch March 23, 2021 19:44
Copy link

Nice! Just a thought - can you also add it to the profile icon at the bottom of the left sidebar? That seems like the most intuitive place to look for it.

Copy link
Contributor Author

jsjoeio commented Mar 24, 2021

@binaryfire thanks for the suggestion! There's some issues with the profile icon (see #2913) but when we work on that, we can consider it! Feel free to leave more thoughts there

code-asher added a commit to code-asher/code-server that referenced this pull request Apr 16, 2021
The tests have been kept.
This reverts commit 947dd85, reversing
changes made to 24dc208.
Copy link

Dual-0 commented May 10, 2021

nice feature! Hope it is okay to put this in here...
At my new installed code-server instance this button isn't working right.
When I click on the button the site is reloading but I'm still logged in.
Cookie is still present.

thanks

Copy link
Contributor Author

jsjoeio commented May 10, 2021

@dual-oo there were a couple bugs fixed in #3277

We're cutting a new release this week so make sure to upgrade and if you have issues, please open a bug report!

Dual-0 and Operator2024 reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@oxy oxy oxy approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
None yet
Projects
None yet
Milestone
v3.9.2
Development

Successfully merging this pull request may close these issues.

Log out button

AltStyle によって変換されたページ (->オリジナル) /