Skip to content

Log out button #778

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

Closed
vwxyzjn opened this issue Jun 16, 2019 · 13 comments · Fixed by #2922
Closed

Log out button #778

vwxyzjn opened this issue Jun 16, 2019 · 13 comments · Fixed by #2922
Assignees
Labels
feature New user visible feature
Milestone

Comments

@vwxyzjn
Copy link

vwxyzjn commented Jun 16, 2019

Description

I couldn’t find a way to logout of the code server once logged in to the code-server

The following docker command was used to host the code-server

docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --no-auth

This functionality is kind of important to me as sometimes I have to use different machines temporarily. Is there by chance a way for me to logout? Thanks a lot.

Related Issues

@deansheather
Copy link
Member

We currently don't have a logout mechanism that I know of.

In the meantime, you can logout of code-server by deleting the password cookie. This cookie should also be deleted when you restart your browser as it's a session cookie (at least on my machine). If you want to logout everywhere, you can change the server password and every device will prompt you to login again.

@vwxyzjn
Copy link
Author

vwxyzjn commented Jun 23, 2019

Closing the browser indeed log me out of the code-server. Thanks!

@vwxyzjn vwxyzjn closed this as completed Jun 23, 2019
@bbrendon
Copy link

bbrendon commented Jan 3, 2020

For me, closing Chrome does not logout so instead I'm using an Incognito browser.

@bwnstck
Copy link

bwnstck commented Jan 20, 2021

deleting the cookie helps ... but why not implementing a logout feature?

@nhooyr
Copy link
Contributor

nhooyr commented Jan 21, 2021

Why do you need to log out?

@nhooyr
Copy link
Contributor

nhooyr commented Jan 21, 2021

Sorry I guess that's a dumb question. I can see the security advantages for sure and it really doesn't make sense we don't have this so I'm reopening.

@nhooyr nhooyr reopened this Jan 21, 2021
@nhooyr nhooyr added the feature New user visible feature label Jan 21, 2021
@nhooyr nhooyr changed the title Log out functionality Log out button Jan 21, 2021
@nhooyr
Copy link
Contributor

nhooyr commented Jan 21, 2021

Perhaps File -> Log Out?

@vwxyzjn
Copy link
Author

vwxyzjn commented Jan 21, 2021

@nhooyr Thats how I imagined it originally 😆. I guess I do have a use case. As a Teaching Assitant, sometimes I get annoyed with students’ editor and wanted to do some formatting using vscode server but then want to log out.

@jsjoeio jsjoeio self-assigned this Jan 22, 2021
@bwnstck
Copy link

bwnstck commented Jan 28, 2021

Perhaps File -> Log Out?

I would put somewhere at the top-level, so people can find it directly. Under or above GoHome makes sense to me :)

I attached a screenshot so folks can imagine the menustructure!

Proposal

@susverwimp
Copy link

@nhooyr A possible use case would be that the code server is behind a oauth2 proxy server. To access the code server public url, one would need to login with an oauth2/oidc identity provider and a customizable logout button could be configured to remove the code-server-session/idp-session so that a user should login again with the idp before they can access the code-server again.

This is something I did before with https://github.com/oauth2-proxy/oauth2-proxy

@zhz
Copy link

zhz commented Feb 26, 2021

@nhooyr Thats how I imagined it originally 😆. I guess I do have a use case. As a Teaching Assitant, sometimes I get annoyed with students’ editor and wanted to do some formatting using vscode server but then want to log out.

Same to me. I use code-server as a portable dev env while teaching in public classrooms . It's necessary to logout manually, closing browser does not work.

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 26, 2021

Thanks for sharing that with us @zhz! I was waiting for #2648 to get merged in before picking this up so that we could make sure to add the proper e2e tests when this feature is added. Hoping to get to this soon!

@jsjoeio jsjoeio added this to the v3.9.2 milestone Feb 26, 2021
@binaryfire
Copy link

+1 for this. Would be great to have as an option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New user visible feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants