diff --git a/src/components/PreferencesPage.vue b/src/components/PreferencesPage.vue
index 34b8fd6c..a2dd8649 100644
--- a/src/components/PreferencesPage.vue
+++ b/src/components/PreferencesPage.vue
@@ -227,6 +227,12 @@
+
@@ -480,6 +486,18 @@ export default {
// redirect to trending page
window.location = "/";
},
+ async invalidateSession() {
+ this.fetchJson(this.apiUrl() + "/logout", null, {
+ method: "POST",
+ headers: {
+ Authorization: this.getAuthToken(),
+ },
+ }).then(resp => {
+ if (!resp.error) {
+ this.logout();
+ } else alert(resp.error);
+ });
+ },
},
};
diff --git a/src/locales/en.json b/src/locales/en.json
index 1909e9d4..abdc1d8a 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -82,8 +82,9 @@
"delete_playlist_confirm": "Are you sure you want to delete this playlist?",
"please_select_playlist": "Please select a playlist",
"delete_account": "Delete Account",
- "logout": "Logout",
- "minimize_recommendations_default": "Minimize Recommendations by default"
+ "logout": "Log out this device",
+ "minimize_recommendations_default": "Minimize Recommendations by default",
+ "invalidate_session": "Log out all devices"
},
"comment": {
"pinned_by": "Pinned by"