{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif732aow476jnoqsrmeipz5w457qincfqfux35sq57fhdlmkxyl7a",
"uri": "at://did:plc:yrn4rbgwenb6lfhhzjegbtnc/app.bsky.feed.post/3meacj5pojjy2"
},
"path": "/t/user-authentication/11698#post_1",
"publishedAt": "2026-02-06T17:07:22.000Z",
"site": "https://discourse.flathub.org",
"textContent": "Hi, I’m trying to add authentication for my Flatpak app.\n\nSome items in the app are “protected,” and I only want users to be able to interact with them after entering their system password. I don’t want to build a password system inside the app; I want to rely on Linux’s native authentication.\n\nThe only way I found so far is using pkexec or the sudo/unix_chkpwd method. However, the pkexec approach requires --talk-name=org.freedesktop.Flatpak, which seems excessive and sudo/unix_chkpwd method still relies on flatpak-spawn --host and therefore still needs --talk-name=org.freedesktop.Flatpak.\n\nI’m looking for a safe, standard way for a Flatpak app to verify the user via system authentication for these protected actions, without exposing the password or bypassing the sandbox, Any advice?",
"title": "User Authentication"
}