From d75f9f126187b1e27cf995ffe9c7683e5b901138 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sun, 31 Dec 2023 16:15:27 +0100 Subject: [PATCH] Work around bug in gnome-keyring preventing keyring unlocking --- utils.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils.js b/utils.js index 1c8a225..e19ca4e 100644 --- a/utils.js +++ b/utils.js @@ -35,8 +35,14 @@ export function disable() { export function getTokenSchema() { if (!TOKEN_SCHEMA) { - TOKEN_SCHEMA = Secret.Schema.new("org.gnome.hass-data.Password", - Secret.SchemaFlags.NONE, + TOKEN_SCHEMA = Secret.Schema.new( + "org.gnome.hass-data.Password", + /** DONT_MATCH_NAME is used as a workaround for a bug in gnome-keyring + * which prevents cold keyrings from being searched (and hence does not prompt for unlocking) + * see https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/89 and + * https://gitlab.gnome.org/GNOME/libsecret/-/issues/7 for more information + */ + Secret.SchemaFlags.DONT_MATCH_NAME, { "token_string": Secret.SchemaAttributeType.STRING, }