Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix logout URL to fully logout. #59

Merged
merged 2 commits into from
Jun 1, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function activateHubExtension(app: JupyterLab, palette: ICommandPalette, mainMen
// in a dictionary: app.web_app.settings['page_config_data'].
let hubHost = PageConfig.getOption('hub_host');
let hubPrefix = PageConfig.getOption('hub_prefix');
let baseUrl = PageConfig.getOption('baseUrl');

if (!hubPrefix) {
console.log('jupyterlab-hub: No configuration found.');
Expand All @@ -65,9 +66,9 @@ function activateHubExtension(app: JupyterLab, palette: ICommandPalette, mainMen

commands.addCommand(CommandIDs.logout, {
label: 'Logout',
caption: 'Log out of the Hub',
caption: 'Shut down this server and log out of the Hub',
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way that we can only logout users without shutting down their servers? I think we should have that ability as that is also possible in the classic interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding was that the issue in #51 was that the server was still accessible specifically because it was still running. I don't know if there is a way to leave the server running while also logging out in the browser.

As far as I can see, though, this change uses the same logout URL as the classic interface ('/tree/'), so it should behave the same way.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, in that case we should keep the menu item label as "Log out...". Visiting the old link does not stop the pod.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, okay. Done.

execute: () => {
window.location.href = hubHost + URLExt.join(hubPrefix, 'logout');
window.location.href = hubHost + URLExt.join(baseUrl, 'logout');
}
});

Expand Down