Skip to content
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

allow to set an optional logout url when using the environment variable authentication #114

Open
ArnY opened this issue May 24, 2017 · 10 comments

Comments

@ArnY
Copy link

ArnY commented May 24, 2017

In some case, when using the environment variable (ie. with CAS), a specific logout url is required to actually logout of nextcloud.

Allowing the admin to optionally set a custom logout url would actually allow a complete implementation of some SSO like CAS. Indeed, until this is possible, users won't be able to logout not until their CAS session actually expires (or until the user closes the browser) which is dangerous.

@LukasReschke
Copy link
Member

Ok. Good point :-)

@Emi94

This comment has been minimized.

@putt1ck

This comment has been minimized.

2 similar comments
@ogr-apc

This comment has been minimized.

@ipm-uma

This comment has been minimized.

@nextcloud nextcloud locked and limited conversation to collaborators Nov 8, 2017
@LukasReschke

This comment has been minimized.

@nextcloud nextcloud unlocked this conversation Jun 19, 2019
@psy

This comment has been minimized.

@seraphyn

This comment has been minimized.

@LukasReschke

This comment has been minimized.

@felagund
Copy link

felagund commented Apr 13, 2024

So, adding

 * @NoCSRFRequired

to logout function here:
https://github.com/nextcloud/server/blob/master/core/Controller/LoginController.php#L95

makes the url your.nextcloud.doman/logout log you out. This is of course then susceptible to CSRF attacks. Setting a custom url like your.nextcloud.doman/my_custom_url_logout would be security by obscurity so not much better. Personally for our (small uninmportant) site, I would be ok with disabling CSRF protection from logout (discussion of its merits is here: https://security.stackexchange.com/questions/62769/should-login-and-logout-action-have-csrf-protection ). Would a PR implementing this as a setting be accepted or something more complicated needs to be prepared (that would be far beyond my ability)?

Our use case is using https://github.com/soudis/discoursesso to sign in to our Discourse instance from Nextcloud. We would like to make sure users log out from Nextcloud when they log out from Discourse. Discourse allows in its settings to direct a user to a specific URL after logout - which Nextcloud does not allow.

Probably a better (but still hackish) solution is here: https://help.nextcloud.com/t/how-can-i-write-my-own-logout-page/14676

P.S. Half a year later: if you setup discourse logout url to https://YOUR_NEXTCLOUD_INSTANCE/index.php/apps/discoursesso/logout , it starts working.

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

No branches or pull requests

9 participants