Logout Changes #9915 (#10022)

* Added session check before route changes, but express isn't finding route

* Added a logout component. Changed route to logout on server. Typing 'logout' in URL will logout of Vue + Express

* Removed commented text from previous version

* Updated logout function to comply with formatting and eliminate unused blocks

* Added package-lock.json back

* package-lock.json

* recreated package-lock file

* fix(auth): allow logout from direct visit to /logout path

* fix(merge): clean up more misc changes

* fix(merge): remove extra file
This commit is contained in:
Jim Pollaro
2018-07-12 15:07:08 -05:00
committed by Sabe Jones
parent f810fff6fc
commit c9755bee7c
5 changed files with 19 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ let api = {};
// Internal authentication routes
// Set a new password after having requested a password reset (GET route to input password)
api.resetPasswordSetNewOne = {
api.resetPasswordSetNewOne = {
method: 'GET',
url: '/static/user/auth/local/reset-password-set-new-one',
runCron: false,
@@ -24,7 +24,7 @@ api.resetPasswordSetNewOne = {
// Logout the user from the website.
api.logout = {
method: 'GET',
url: '/logout',
url: '/logout-server',
async handler (req, res) {
if (req.logout) req.logout(); // passportjs method
req.session = null;