mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
* [SG-471] Passwordless device login screen (#2017) * [SSG-471] Added UI for the device login request response. * [SG-471] Added text resources and arguments to Page. * [SG-471] Added properties to speed up page bindings * [SG-471] Added mock services. Added Accept/reject command binding, navigation and toast messages. * [SG-471] fixed code styling with dotnet-format * [SG-471] Fixed back button placement. PR fixes. * [SG-471] Added new Origin parameter to the page. * [SG-471] PR Fixes * [SG-471] PR fixes * [SG-471] PR Fix: added FireAndForget. * [SG-471] Moved fire and forget to run on ui thread task. * [SG-381] Passwordless - Add setting to Mobile (#2037) * [SG-381] Added settings option to approve passwordless login request. If user has notifications disabled, prompt to go to settings and enable them. * [SG-381] Update settings pop up texts. * [SG-381] Added new method to get notifications state on device settings. Added userId to property saved on device to differentiate value between users. * [SG-381] Added text for the popup on selection. * [SG-381] PR Fixes * [SG-408] Implement passwordless api methods (#2055) * [SG-408] Update notification model. * [SG-408] removed duplicated resource * [SG-408] Added implementation to Api Service of new passwordless methods. * removed qa endpoints * [SG-408] Changed auth methods implementation, added method call to viewmodel. * [SG-408] ran code format * [SG-408] PR fixes * [SG-472] Add configuration for new notification type (#2056) * [SG-472] Added methods to present local notification to the user. Configured new notification type for passwordless logins * [SG-472] Updated code to new api service changes. * [SG-472] ran dotnet format * [SG-472] PR Fixes. * [SG-472] PR Fixes * [SG-169] End-to-end testing refactor. (#2073) * [SG-169] Passwordless demo change requests (#2079) * [SG-169] End-to-end testing refactor. * [SG-169] Fixed labels. Changed color of Fingerprint phrase. Waited for app to be in foreground to launch passwordless modal to fix Android issues. * [SG-169] Anchored buttons to the bottom of the screen. * [SG-169] Changed device type from enum to string. * [SG-169] PR fixes * [SG-169] PR fixes * [SG-169] Added comment on static variable
95 lines
6.6 KiB
C#
95 lines
6.6 KiB
C#
namespace Bit.Core
|
|
{
|
|
public static class Constants
|
|
{
|
|
public const int MaxAccounts = 5;
|
|
public const string AndroidAppProtocol = "androidapp://";
|
|
public const string iOSAppProtocol = "iosapp://";
|
|
public const string DefaultUsernameGenerated = "-";
|
|
public static string StateVersionKey = "stateVersion";
|
|
public static string StateKey = "state";
|
|
public static string PreAuthEnvironmentUrlsKey = "preAuthEnvironmentUrls";
|
|
public static string LastFileCacheClearKey = "lastFileCacheClear";
|
|
public static string AutofillTileAdded = "autofillTileAdded";
|
|
public static string PushRegisteredTokenKey = "pushRegisteredToken";
|
|
public static string PushCurrentTokenKey = "pushCurrentToken";
|
|
public static string PushLastRegistrationDateKey = "pushLastRegistrationDate";
|
|
public static string PushInitialPromptShownKey = "pushInitialPromptShown";
|
|
public static string PushInstallationRegistrationErrorKey = "pushInstallationRegistrationError";
|
|
public static string LastBuildKey = "lastBuild";
|
|
public static string AddSitePromptShownKey = "addSitePromptShown";
|
|
public static string ClearCiphersCacheKey = "clearCiphersCache";
|
|
public static string BiometricIntegrityKey = "biometricIntegrityState";
|
|
public static string iOSAutoFillClearCiphersCacheKey = "iOSAutoFillClearCiphersCache";
|
|
public static string iOSAutoFillBiometricIntegrityKey = "iOSAutoFillBiometricIntegrityState";
|
|
public static string iOSExtensionClearCiphersCacheKey = "iOSExtensionClearCiphersCache";
|
|
public static string iOSExtensionBiometricIntegrityKey = "iOSExtensionBiometricIntegrityState";
|
|
public static string iOSShareExtensionClearCiphersCacheKey = "iOSShareExtensionClearCiphersCache";
|
|
public static string iOSShareExtensionBiometricIntegrityKey = "iOSShareExtensionBiometricIntegrityState";
|
|
public static string iOSExtensionActiveUserIdKey = "iOSExtensionActiveUserId";
|
|
public static string EventCollectionKey = "eventCollection";
|
|
public static string RememberedEmailKey = "rememberedEmail";
|
|
public static string RememberedOrgIdentifierKey = "rememberedOrgIdentifier";
|
|
public const string PasswordlessNotificationId = "26072022";
|
|
public const string AndroidNotificationChannelId = "general_notification_channel";
|
|
public const int SelectFileRequestCode = 42;
|
|
public const int SelectFilePermissionRequestCode = 43;
|
|
public const int SaveFileRequestCode = 44;
|
|
public const int TotpDefaultTimer = 30;
|
|
|
|
public static readonly string[] AndroidAllClearCipherCacheKeys =
|
|
{
|
|
ClearCiphersCacheKey
|
|
};
|
|
|
|
public static readonly string[] iOSAllClearCipherCacheKeys =
|
|
{
|
|
ClearCiphersCacheKey,
|
|
iOSAutoFillClearCiphersCacheKey,
|
|
iOSExtensionClearCiphersCacheKey,
|
|
iOSShareExtensionClearCiphersCacheKey
|
|
};
|
|
|
|
public static string CiphersKey(string userId) => $"ciphers_{userId}";
|
|
public static string FoldersKey(string userId) => $"folders_{userId}";
|
|
public static string CollectionsKey(string userId) => $"collections_{userId}";
|
|
public static string OrganizationsKey(string userId) => $"organizations_{userId}";
|
|
public static string LocalDataKey(string userId) => $"ciphersLocalData_{userId}";
|
|
public static string NeverDomainsKey(string userId) => $"neverDomains_{userId}";
|
|
public static string SendsKey(string userId) => $"sends_{userId}";
|
|
public static string PoliciesKey(string userId) => $"policies_{userId}";
|
|
public static string KeyKey(string userId) => $"key_{userId}";
|
|
public static string EncOrgKeysKey(string userId) => $"encOrgKeys_{userId}";
|
|
public static string EncPrivateKeyKey(string userId) => $"encPrivateKey_{userId}";
|
|
public static string EncKeyKey(string userId) => $"encKey_{userId}";
|
|
public static string KeyHashKey(string userId) => $"keyHash_{userId}";
|
|
public static string PinProtectedKey(string userId) => $"pinProtectedKey_{userId}";
|
|
public static string PassGenOptionsKey(string userId) => $"passwordGenerationOptions_{userId}";
|
|
public static string PassGenHistoryKey(string userId) => $"generatedPasswordHistory_{userId}";
|
|
public static string TwoFactorTokenKey(string email) => $"twoFactorToken_{email}";
|
|
public static string LastActiveTimeKey(string userId) => $"lastActiveTime_{userId}";
|
|
public static string InvalidUnlockAttemptsKey(string userId) => $"invalidUnlockAttempts_{userId}";
|
|
public static string InlineAutofillEnabledKey(string userId) => $"inlineAutofillEnabled_{userId}";
|
|
public static string AutofillDisableSavePromptKey(string userId) => $"autofillDisableSavePrompt_{userId}";
|
|
public static string AutofillBlacklistedUrisKey(string userId) => $"autofillBlacklistedUris_{userId}";
|
|
public static string ClearClipboardKey(string userId) => $"clearClipboard_{userId}";
|
|
public static string SyncOnRefreshKey(string userId) => $"syncOnRefresh_{userId}";
|
|
public static string DisableFaviconKey(string userId) => $"disableFavicon_{userId}";
|
|
public static string DefaultUriMatchKey(string userId) => $"defaultUriMatch_{userId}";
|
|
public static string ThemeKey(string userId) => $"theme_{userId}";
|
|
public static string AutoDarkThemeKey(string userId) => $"autoDarkTheme_{userId}";
|
|
public static string DisableAutoTotpCopyKey(string userId) => $"disableAutoTotpCopy_{userId}";
|
|
public static string PreviousPageKey(string userId) => $"previousPage_{userId}";
|
|
public static string PasswordRepromptAutofillKey(string userId) => $"passwordRepromptAutofillKey_{userId}";
|
|
public static string PasswordVerifiedAutofillKey(string userId) => $"passwordVerifiedAutofillKey_{userId}";
|
|
public static string SettingsKey(string userId) => $"settings_{userId}";
|
|
public static string UsesKeyConnectorKey(string userId) => $"usesKeyConnector_{userId}";
|
|
public static string ProtectedPinKey(string userId) => $"protectedPin_{userId}";
|
|
public static string LastSyncKey(string userId) => $"lastSync_{userId}";
|
|
public static string BiometricUnlockKey(string userId) => $"biometricUnlock_{userId}";
|
|
public static string ApprovePasswordlessLoginsKey(string userId) => $"approvePasswordlessLogins_{userId}";
|
|
public static string PasswordlessLoginNofiticationKey(string userId) => $"passwordlessLoginNofitication_{userId}";
|
|
public static string UsernameGenOptionsKey(string userId) => $"usernameGenerationOptions_{userId}";
|
|
}
|
|
}
|