Skip to content

Commit

Permalink
Merge pull request #71 from brenard/master
Browse files Browse the repository at this point in the history
Work around bug in gnome-keyring preventing keyring unlocking
  • Loading branch information
geoph9 committed Jan 11, 2024
2 parents f6a7336 + d75f9f1 commit c2d0236
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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,
}
Expand Down

0 comments on commit c2d0236

Please sign in to comment.