From e7d0ed2020097008f529e99194239ba00a786a53 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 1 Oct 2025 22:55:48 +0200 Subject: [PATCH] fix(sessions): Hide one-time app passwords Signed-off-by: Joas Schilling --- apps/settings/src/components/AuthTokenList.vue | 6 ++++-- apps/settings/src/store/authtoken.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/settings/src/components/AuthTokenList.vue b/apps/settings/src/components/AuthTokenList.vue index a38a892ed57..f8be3e77719 100644 --- a/apps/settings/src/components/AuthTokenList.vue +++ b/apps/settings/src/components/AuthTokenList.vue @@ -33,7 +33,7 @@ import { translate as t } from '@nextcloud/l10n' import { defineComponent } from 'vue' import AuthToken from './AuthToken.vue' -import { useAuthTokenStore } from '../store/authtoken.ts' +import { TokenType, useAuthTokenStore } from '../store/authtoken.ts' export default defineComponent({ name: 'AuthTokenList', @@ -48,7 +48,9 @@ export default defineComponent({ computed: { sortedTokens() { - return [...this.authTokenStore.tokens].sort((t1, t2) => t2.lastActivity - t1.lastActivity) + return [...this.authTokenStore.tokens] + .filter((t) => t.type !== TokenType.ONETIME_TOKEN) + .sort((t1, t2) => t2.lastActivity - t1.lastActivity) }, }, diff --git a/apps/settings/src/store/authtoken.ts b/apps/settings/src/store/authtoken.ts index edff189dbb4..542a6f73547 100644 --- a/apps/settings/src/store/authtoken.ts +++ b/apps/settings/src/store/authtoken.ts @@ -31,6 +31,7 @@ export enum TokenType { TEMPORARY_TOKEN = 0, PERMANENT_TOKEN = 1, WIPING_TOKEN = 2, + ONETIME_TOKEN = 3, } export interface IToken {