Storing persisted secrets with libsecret?


I’m trying to store secrets using libsecret using the simple API’s. If I don’t have “–talk-name=org.freedesktop.secrets” as part of my flatpak manifest, I never get a callback from Secret.password_storev.begin when trying to store secrets.

If I do have “–talk-name=org.freedesktop.secrets” in my manifest, the secret is stored, but once I close/restart the application, the secret is no longer available/doesn’t appear to be persisted.

For storing I’m using:

Secret.password_storev.begin (
                "%s:%s".printf(url, alias),
                null, (obj, async_res) =>

And for retrieving:

Secret.password_lookupv.begin (thief_secret, attributes, null, (obj, async_res) => {

My manifest has:

    "runtime": "org.gnome.Platform",
    "runtime-version": "3.38",
    "sdk": "org.gnome.Sdk",
    "finish-args": [

I added “shared-modules/libsecret/libsecret.json”, to my modules list.

Are there any good examples/ways to debug using libsecret?

I tried this in Fedora 33, the passwords are able to store, but they don’t persist.

On Ubuntu 20.04, I hit issues trying to store and retrieve, so it looks like it’s not consistent in flatpak and depends on host-side implementations?