summaryrefslogtreecommitdiffstats
path: root/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/aboutlogins/AboutLoginsParent.sys.mjs')
-rw-r--r--browser/components/aboutlogins/AboutLoginsParent.sys.mjs21
1 files changed, 11 insertions, 10 deletions
diff --git a/browser/components/aboutlogins/AboutLoginsParent.sys.mjs b/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
index 28f56c2172..4342e60296 100644
--- a/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
+++ b/browser/components/aboutlogins/AboutLoginsParent.sys.mjs
@@ -17,7 +17,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
LoginExport: "resource://gre/modules/LoginExport.sys.mjs",
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
MigrationUtils: "resource:///modules/MigrationUtils.sys.mjs",
- OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
UIState: "resource://services-sync/UIState.sys.mjs",
});
@@ -38,12 +37,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
);
XPCOMUtils.defineLazyPreferenceGetter(
lazy,
- "OS_AUTH_ENABLED",
- "signon.management.page.os-auth.enabled",
- true
-);
-XPCOMUtils.defineLazyPreferenceGetter(
- lazy,
"VULNERABLE_PASSWORDS_ENABLED",
"signon.management.page.vulnerable-passwords.enabled",
false
@@ -266,11 +259,15 @@ export class AboutLoginsParent extends JSWindowActorParent {
let messageText = { value: "NOT SUPPORTED" };
let captionText = { value: "" };
+ const isOSAuthEnabled = lazy.LoginHelper.getOSAuthEnabled(
+ lazy.LoginHelper.OS_AUTH_FOR_PASSWORDS_PREF
+ );
+
// This feature is only supported on Windows and macOS
// but we still call in to OSKeyStore on Linux to get
// the proper auth_details for Telemetry.
// See bug 1614874 for Linux support.
- if (lazy.OS_AUTH_ENABLED && lazy.OSKeyStore.canReauth()) {
+ if (isOSAuthEnabled) {
messageId += "-" + AppConstants.platform;
[messageText, captionText] = await lazy.AboutLoginsL10n.formatMessages([
{
@@ -284,7 +281,7 @@ export class AboutLoginsParent extends JSWindowActorParent {
let { isAuthorized, telemetryEvent } = await lazy.LoginHelper.requestReauth(
this.browsingContext.embedderElement,
- lazy.OS_AUTH_ENABLED,
+ isOSAuthEnabled,
AboutLogins._authExpirationTime,
messageText.value,
captionText.value
@@ -378,11 +375,15 @@ export class AboutLoginsParent extends JSWindowActorParent {
let messageText = { value: "NOT SUPPORTED" };
let captionText = { value: "" };
+ const isOSAuthEnabled = lazy.LoginHelper.getOSAuthEnabled(
+ lazy.LoginHelper.OS_AUTH_FOR_PASSWORDS_PREF
+ );
+
// This feature is only supported on Windows and macOS
// but we still call in to OSKeyStore on Linux to get
// the proper auth_details for Telemetry.
// See bug 1614874 for Linux support.
- if (lazy.OSKeyStore.canReauth()) {
+ if (isOSAuthEnabled) {
const messageId =
EXPORT_PASSWORD_OS_AUTH_DIALOG_MESSAGE_IDS[AppConstants.platform];
if (!messageId) {