@oxy.so/services 14.6.1 → 14.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/OxyIdentityModule.swift +62 -7
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/ui/hooks/useProfileEditing.js +11 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +47 -0
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +8 -0
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/session/nativeSecureStorage.js +14 -3
- package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -1
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js +30 -18
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js.map +1 -1
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/ui/hooks/useProfileEditing.js +11 -0
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +48 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +8 -0
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/session/nativeSecureStorage.js +14 -4
- package/lib/module/ui/session/nativeSecureStorage.js.map +1 -1
- package/lib/module/ui/session/sharedDeviceCredentialStore.js +31 -19
- package/lib/module/ui/session/sharedDeviceCredentialStore.js.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +2 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +2 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts +4 -4
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +18 -1
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +2 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +2 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts +4 -4
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts +18 -1
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -4
- package/src/ui/hooks/useProfileEditing.ts +14 -1
- package/src/ui/icons/subsetGlyphMaps.ts +1 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +71 -2
- package/src/ui/screens/EditProfileScreen.tsx +11 -0
- package/src/ui/session/__tests__/sharedDeviceCredentialStore.test.ts +54 -12
- package/src/ui/session/nativeSecureStorage.ts +24 -7
- package/src/ui/session/sharedDeviceCredentialStore.ts +34 -18
- package/lib/typescript/types/expo-secure-store.d.ts +0 -29
- package/src/types/expo-secure-store.d.ts +0 -29
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SharedDeviceCredentialStore } from '@oxy.so/core/session';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* The keychain access group (after the team prefix) every Oxy app declares.
|
|
4
|
+
* The value passed to the keychain is `<TEAM>.` + this; see
|
|
5
|
+
* {@link sharedGroupOptions}.
|
|
6
6
|
*/
|
|
7
7
|
export declare const IOS_KEYCHAIN_ACCESS_GROUP = "group.so.oxy.shared";
|
|
8
8
|
/**
|
|
@@ -20,7 +20,7 @@ export declare const SHARED_DEVICE_SESSION_STORAGE_KEY = "oxy_shared_device_sess
|
|
|
20
20
|
*
|
|
21
21
|
* The branch is on the PLATFORM, not on which module happens to load, because
|
|
22
22
|
* `expo-secure-store` loads perfectly well on Android — it would just quietly
|
|
23
|
-
* ignore `
|
|
23
|
+
* ignore `accessGroup` and read a package-private item, which looks
|
|
24
24
|
* exactly like an empty shared slot. This is the same iOS-vs-Android split
|
|
25
25
|
* `KeyManager` makes for the shared identity, for the same reason.
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedDeviceCredentialStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/sharedDeviceCredentialStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sharedDeviceCredentialStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/sharedDeviceCredentialStore.ts"],"names":[],"mappings":"AA0CA,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,uBAAuB,CAAC;AAExE,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAkQhF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yCAAyC,IAAI,2BAA2B,GAAG,IAAI,CAO9F"}
|
|
@@ -26,6 +26,24 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
26
26
|
syncOrganizationKeys: typeof import("@oxy.so/core/crypto").syncOrganizationKeys;
|
|
27
27
|
isOrganizationAccountId: typeof import("@oxy.so/core/crypto").isOrganizationAccountId;
|
|
28
28
|
isHealthyOrganizationKeyPair: typeof import("@oxy.so/core/crypto").isHealthyOrganizationKeyPair;
|
|
29
|
+
KEYCHAIN_ACCESS_GROUPS: {
|
|
30
|
+
readonly identity: "so.oxy.identity";
|
|
31
|
+
readonly wallet: "so.oxy.wallet";
|
|
32
|
+
readonly shared: "group.so.oxy.shared";
|
|
33
|
+
};
|
|
34
|
+
KeychainAccessUnavailableError: typeof import("@oxy.so/core/session").KeychainAccessUnavailableError;
|
|
35
|
+
keychainGroupFor: typeof import("@oxy.so/core/crypto").keychainGroupFor;
|
|
36
|
+
mayHoldKeychainItem: typeof import("@oxy.so/core/crypto").mayHoldKeychainItem;
|
|
37
|
+
resolveKeychainAccess: typeof import("@oxy.so/core/session").resolveKeychainAccess;
|
|
38
|
+
keychainAccessGroupValue: typeof import("@oxy.so/core/session").keychainAccessGroupValue;
|
|
39
|
+
keychainReadPlan: typeof import("@oxy.so/core/crypto").keychainReadPlan;
|
|
40
|
+
keychainDeletePlan: typeof import("@oxy.so/core/crypto").keychainDeletePlan;
|
|
41
|
+
keychainWriteOption: typeof import("@oxy.so/core/crypto").keychainWriteOption;
|
|
42
|
+
ownKeychainItemPlan: typeof import("@oxy.so/core/session").ownKeychainItemPlan;
|
|
43
|
+
readThroughPlan: typeof import("@oxy.so/core/session").readThroughPlan;
|
|
44
|
+
deleteThroughPlan: typeof import("@oxy.so/core/session").deleteThroughPlan;
|
|
45
|
+
groupedKeychainStore: typeof import("@oxy.so/core/crypto").groupedKeychainStore;
|
|
46
|
+
ensureKeychainGroupsMigrated: typeof import("@oxy.so/core/crypto").ensureKeychainGroupsMigrated;
|
|
29
47
|
SignatureService: typeof import("@oxy.so/core/crypto").SignatureService;
|
|
30
48
|
RecoveryPhraseService: typeof import("@oxy.so/core/crypto").RecoveryPhraseService;
|
|
31
49
|
BACKUP_KDF_ENCRYPTION_INFO: "oxy-backup-encryption-key";
|
|
@@ -39,7 +57,6 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
39
57
|
SOCIAL_RECEIVE_CHAIN_CODE_KEY: "oxypay/faircoin/social/v1";
|
|
40
58
|
MAX_SOCIAL_RECEIVE_INDEX: 2147483647;
|
|
41
59
|
deriveScopedSeedFromKey: typeof import("@oxy.so/core/crypto").deriveScopedSeedFromKey;
|
|
42
|
-
deriveSocialReceiveKey: typeof import("@oxy.so/core/crypto").deriveSocialReceiveKey;
|
|
43
60
|
signSocialReceiveDigest: typeof import("@oxy.so/core/crypto").signSocialReceiveDigest;
|
|
44
61
|
authChallengeDigest: typeof import("@oxy.so/core/crypto").authChallengeDigest;
|
|
45
62
|
digestIdentityPayload: typeof import("@oxy.so/core/crypto").digestIdentityPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.8.0",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"devDependencies": {
|
|
184
184
|
"@expo/app-integrity": "~58.0.2",
|
|
185
185
|
"@expo/vector-icons": "^15.1.1",
|
|
186
|
-
"@oxy.so/core": "7.
|
|
186
|
+
"@oxy.so/core": "7.29.0",
|
|
187
187
|
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
188
188
|
"@react-native-community/netinfo": "^12.0.1",
|
|
189
189
|
"@react-native/babel-preset": "^0.88.1",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"@expo/app-integrity": ">=0.1.10 <59.0.0",
|
|
237
237
|
"@expo/vector-icons": "^15.0.3",
|
|
238
238
|
"@oxy.so/bloom": ">=11.1.0",
|
|
239
|
-
"@oxy.so/core": "^7.
|
|
239
|
+
"@oxy.so/core": "^7.29.0",
|
|
240
240
|
"@react-native-async-storage/async-storage": ">=2.0.0 <4.0.0",
|
|
241
241
|
"@react-native-community/netinfo": ">=11.4.1 <13.0.0",
|
|
242
242
|
"@tanstack/query-async-storage-persister": "^5.101",
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"fontFamily": "OxyServicesIonicons",
|
|
7
7
|
"file": "src/assets/fonts/icons/OxyServicesIonicons.ttf",
|
|
8
8
|
"bytes": 42552,
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "e96171a1057f9bdd8c84f4bda471bba65eefee63b00aefd88a04f06b12fbb84d",
|
|
10
10
|
"names": [
|
|
11
11
|
"add",
|
|
12
12
|
"add-circle-outline",
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
"materialCommunityIcons": {
|
|
153
153
|
"fontFamily": "OxyServicesMaterialCommunityIcons",
|
|
154
154
|
"file": "src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf",
|
|
155
|
-
"bytes":
|
|
156
|
-
"sha256": "
|
|
155
|
+
"bytes": 29268,
|
|
156
|
+
"sha256": "51b5f47ec2eaf09a7ef0d8f4400350c854805698fb139afa0e9f31f29479165e",
|
|
157
157
|
"names": [
|
|
158
158
|
"account",
|
|
159
159
|
"account-circle",
|
|
@@ -165,6 +165,7 @@
|
|
|
165
165
|
"account-plus",
|
|
166
166
|
"account-search",
|
|
167
167
|
"account-switch",
|
|
168
|
+
"account-voice",
|
|
168
169
|
"alert",
|
|
169
170
|
"alert-circle",
|
|
170
171
|
"alert-circle-outline",
|
|
@@ -353,5 +354,5 @@
|
|
|
353
354
|
}
|
|
354
355
|
},
|
|
355
356
|
"glyphMapsFile": "src/ui/icons/subsetGlyphMaps.ts",
|
|
356
|
-
"glyphMapsSha256": "
|
|
357
|
+
"glyphMapsSha256": "8aef398b9836d5501ff4cdc2f0b13b36e9f42fa5a118833312d6a8847f6b61ff"
|
|
357
358
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import { useUpdateProfile } from './mutations/useAccountMutations';
|
|
3
3
|
import { useAuthStore } from '../stores/authStore';
|
|
4
|
-
import type { UserProfileUpdate } from '@oxy.so/contracts';
|
|
4
|
+
import type { Pronouns, UserProfileUpdate } from '@oxy.so/contracts';
|
|
5
|
+
import { PRONOUNS } from '@oxy.so/contracts/client';
|
|
5
6
|
|
|
6
7
|
interface ProfileLocation {
|
|
7
8
|
id: string;
|
|
@@ -32,10 +33,15 @@ export interface ProfileUpdateData {
|
|
|
32
33
|
address?: string;
|
|
33
34
|
birthday?: string;
|
|
34
35
|
dateOfBirth?: string;
|
|
36
|
+
pronouns?: Pronouns;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
type ProfileFieldValue = string | ProfileLocation[] | ProfileLinkMetadata[];
|
|
38
40
|
|
|
41
|
+
function isPronouns(value: string): value is Pronouns {
|
|
42
|
+
return (PRONOUNS as readonly string[]).includes(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
function isProfileLocationArray(value: ProfileFieldValue): value is ProfileLocation[] {
|
|
40
46
|
return (
|
|
41
47
|
Array.isArray(value) &&
|
|
@@ -102,6 +108,9 @@ export const useProfileEditing = () => {
|
|
|
102
108
|
// field.
|
|
103
109
|
updateData.dateOfBirth = updates.dateOfBirth === '' ? null : updates.dateOfBirth;
|
|
104
110
|
}
|
|
111
|
+
if (updates.pronouns !== undefined) {
|
|
112
|
+
updateData.pronouns = updates.pronouns;
|
|
113
|
+
}
|
|
105
114
|
|
|
106
115
|
// Handle name field
|
|
107
116
|
if (updates.firstName !== undefined || updates.lastName !== undefined) {
|
|
@@ -162,6 +171,10 @@ export const useProfileEditing = () => {
|
|
|
162
171
|
if (typeof value !== 'string') return false;
|
|
163
172
|
updates.birthday = value;
|
|
164
173
|
break;
|
|
174
|
+
case 'pronouns':
|
|
175
|
+
if (typeof value !== 'string' || !isPronouns(value)) return false;
|
|
176
|
+
updates.pronouns = value;
|
|
177
|
+
break;
|
|
165
178
|
case 'dateOfBirth':
|
|
166
179
|
// '' clears it (the picker's "no complete date selected"
|
|
167
180
|
// state) — `updateUserProfile`'s `dateOfBirth` block treats
|
|
@@ -9,7 +9,21 @@ import { PhoneInput, COUNTRIES, findCountry } from '@oxy.so/bloom/phone-input';
|
|
|
9
9
|
import { Textarea } from '@oxy.so/bloom/textarea';
|
|
10
10
|
import { DatePicker } from '@oxy.so/bloom/date-picker';
|
|
11
11
|
import { Field } from '@oxy.so/bloom/field';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
Select,
|
|
14
|
+
SelectContent,
|
|
15
|
+
SelectIcon,
|
|
16
|
+
SelectItem,
|
|
17
|
+
SelectItemIndicator,
|
|
18
|
+
SelectItemText,
|
|
19
|
+
SelectTrigger,
|
|
20
|
+
SelectValue,
|
|
21
|
+
} from '@oxy.so/bloom/select';
|
|
22
|
+
import {
|
|
23
|
+
PRONOUNS,
|
|
24
|
+
USERNAME_MAX_LENGTH,
|
|
25
|
+
stripDisallowedUsernameCharacters,
|
|
26
|
+
} from '@oxy.so/contracts/client';
|
|
13
27
|
import { useUsernameAvailability } from '../hooks/useUsernameAvailability';
|
|
14
28
|
import { GroupedSection, GroupedSectionItem } from '@oxy.so/bloom/grouped-section';
|
|
15
29
|
import type { User } from '@oxy.so/core';
|
|
@@ -43,7 +57,8 @@ export type ProfileFieldType =
|
|
|
43
57
|
| 'birthday'
|
|
44
58
|
| 'location'
|
|
45
59
|
| 'locations'
|
|
46
|
-
| 'links'
|
|
60
|
+
| 'links'
|
|
61
|
+
| 'pronouns';
|
|
47
62
|
|
|
48
63
|
/**
|
|
49
64
|
* Field configuration for each field type
|
|
@@ -157,6 +172,9 @@ function buildInitialProfileState(
|
|
|
157
172
|
case 'address':
|
|
158
173
|
fieldValues.address = String(userData.address || '');
|
|
159
174
|
break;
|
|
175
|
+
case 'pronouns':
|
|
176
|
+
fieldValues.pronouns = userData.pronouns ?? 'unspecified';
|
|
177
|
+
break;
|
|
160
178
|
case 'username':
|
|
161
179
|
case 'bio':
|
|
162
180
|
case 'phone':
|
|
@@ -230,6 +248,16 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
|
|
|
230
248
|
const invalidNameMessage =
|
|
231
249
|
t(`editProfile.items.displayName.${accountNameInvalidKey(kind)}`) ||
|
|
232
250
|
accountNameInvalidMessage(kind);
|
|
251
|
+
// The closed pronoun list, labelled for the picker in the active language.
|
|
252
|
+
const pronounItems = useMemo(
|
|
253
|
+
() =>
|
|
254
|
+
PRONOUNS.map((value) => ({
|
|
255
|
+
value,
|
|
256
|
+
label: t(`editProfile.items.pronouns.options.${value}`) || value,
|
|
257
|
+
})),
|
|
258
|
+
[t],
|
|
259
|
+
);
|
|
260
|
+
|
|
233
261
|
// Get field configuration based on fieldType
|
|
234
262
|
const fieldConfig = useMemo((): FieldConfig => {
|
|
235
263
|
switch (fieldType) {
|
|
@@ -299,6 +327,18 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
|
|
|
299
327
|
},
|
|
300
328
|
],
|
|
301
329
|
};
|
|
330
|
+
case 'pronouns':
|
|
331
|
+
return {
|
|
332
|
+
title: t('editProfile.items.pronouns.title') || 'Pronouns',
|
|
333
|
+
subtitle: t('editProfile.items.pronouns.subtitle') || 'How people should refer to you',
|
|
334
|
+
fields: [
|
|
335
|
+
{
|
|
336
|
+
key: 'pronouns',
|
|
337
|
+
label: t('editProfile.items.pronouns.label') || 'Pronouns',
|
|
338
|
+
placeholder: '',
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
};
|
|
302
342
|
case 'phone':
|
|
303
343
|
return {
|
|
304
344
|
title: t('editProfile.items.phone.title') || 'Phone Number',
|
|
@@ -529,6 +569,35 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
|
|
|
529
569
|
: undefined
|
|
530
570
|
: undefined);
|
|
531
571
|
|
|
572
|
+
if (field.key === 'pronouns') {
|
|
573
|
+
const chosen = fieldValues.pronouns || 'unspecified';
|
|
574
|
+
return (
|
|
575
|
+
<Field key={field.key} label={field.label} disabled={isSaving}>
|
|
576
|
+
<Select
|
|
577
|
+
value={chosen}
|
|
578
|
+
disabled={isSaving}
|
|
579
|
+
onValueChange={(value) => handleFieldChange('pronouns', value)}
|
|
580
|
+
>
|
|
581
|
+
<SelectTrigger>
|
|
582
|
+
<SelectValue>
|
|
583
|
+
{() => pronounItems.find((item) => item.value === chosen)?.label ?? chosen}
|
|
584
|
+
</SelectValue>
|
|
585
|
+
<SelectIcon />
|
|
586
|
+
</SelectTrigger>
|
|
587
|
+
<SelectContent
|
|
588
|
+
label={field.label}
|
|
589
|
+
items={pronounItems}
|
|
590
|
+
renderItem={(item) => (
|
|
591
|
+
<SelectItem value={item.value} label={item.label}>
|
|
592
|
+
<SelectItemIndicator />
|
|
593
|
+
<SelectItemText>{item.label}</SelectItemText>
|
|
594
|
+
</SelectItem>
|
|
595
|
+
)}
|
|
596
|
+
/>
|
|
597
|
+
</Select>
|
|
598
|
+
</Field>
|
|
599
|
+
);
|
|
600
|
+
}
|
|
532
601
|
if (field.key === 'phone') {
|
|
533
602
|
return (
|
|
534
603
|
<PhoneInput
|
|
@@ -114,6 +114,17 @@ const EditProfileScreen: React.FC<BaseScreenProps> = ({ navigate }) => {
|
|
|
114
114
|
description={user?.bio || notSet}
|
|
115
115
|
onPress={() => goToField('bio')}
|
|
116
116
|
/>
|
|
117
|
+
{/* Pronouns name a person; an organization, channel, bot or project has none. */}
|
|
118
|
+
{user?.kind === 'personal' && (
|
|
119
|
+
<GroupedSectionItem
|
|
120
|
+
icon={<SettingsIcon name="account-voice" color={bloomTheme.colors.info} />}
|
|
121
|
+
title={t('editProfile.items.pronouns.title') || 'Pronouns'}
|
|
122
|
+
description={
|
|
123
|
+
t(`editProfile.items.pronouns.options.${user.pronouns ?? 'unspecified'}`) || notSet
|
|
124
|
+
}
|
|
125
|
+
onPress={() => goToField('pronouns')}
|
|
126
|
+
/>
|
|
127
|
+
)}
|
|
117
128
|
<GroupedSectionItem
|
|
118
129
|
icon={<SettingsIcon name="map-marker" color={bloomTheme.colors.info} />}
|
|
119
130
|
title={t('editProfile.items.address.title') || 'Address'}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* explicit status. Collapsing either failure into "absent" is what would let a
|
|
9
9
|
* locked device look like one that never had a session.
|
|
10
10
|
*/
|
|
11
|
-
import type { SharedDeviceCredentialStore } from '@oxy.so/core/session';
|
|
11
|
+
import type { KeychainAccess, SharedDeviceCredentialStore } from '@oxy.so/core/session';
|
|
12
12
|
|
|
13
13
|
const CRED = { deviceId: 'dev-shared', deviceSecret: 'ds-shared' };
|
|
14
14
|
const STORAGE_KEY = 'oxy_shared_device_session_v1';
|
|
@@ -85,9 +85,19 @@ function loadStore(
|
|
|
85
85
|
seams: {
|
|
86
86
|
secureStore?: ReturnType<typeof makeSecureStoreMock>;
|
|
87
87
|
broker?: BrokerModule | null;
|
|
88
|
+
/** What `resolveKeychainAccess` answers (an Error: throws); default: a build without the probe. */
|
|
89
|
+
access?: KeychainAccess | Error;
|
|
88
90
|
} = {},
|
|
89
91
|
): SharedDeviceCredentialStore | null {
|
|
90
92
|
jest.resetModules();
|
|
93
|
+
const access: KeychainAccess | Error = seams.access ?? { mode: 'ungrouped' };
|
|
94
|
+
jest.doMock('@oxy.so/core/session', () => ({
|
|
95
|
+
...jest.requireActual('@oxy.so/core/session'),
|
|
96
|
+
resolveKeychainAccess: async () => {
|
|
97
|
+
if (access instanceof Error) throw access;
|
|
98
|
+
return access;
|
|
99
|
+
},
|
|
100
|
+
}));
|
|
91
101
|
jest.doMock('expo-modules-core', () => ({
|
|
92
102
|
requireOptionalNativeModule: () => seams.broker ?? null,
|
|
93
103
|
requireNativeModule: () => {
|
|
@@ -115,6 +125,7 @@ function loadStore(
|
|
|
115
125
|
}
|
|
116
126
|
|
|
117
127
|
afterEach(() => {
|
|
128
|
+
jest.dontMock('@oxy.so/core/session');
|
|
118
129
|
jest.dontMock('expo-modules-core');
|
|
119
130
|
jest.dontMock('expo-secure-store');
|
|
120
131
|
jest.resetModules();
|
|
@@ -182,22 +193,53 @@ describe('iOS keychain-group slot', () => {
|
|
|
182
193
|
expect((await store?.read())?.state).toBe('unavailable');
|
|
183
194
|
});
|
|
184
195
|
|
|
185
|
-
test('reads and writes carry the dedicated service AND the
|
|
196
|
+
test('reads and writes carry the dedicated service AND the team-prefixed shared group', async () => {
|
|
197
|
+
// Commons: its DEFAULT group is the identity group, so an item written
|
|
198
|
+
// without the explicit shared group would be invisible to every sibling.
|
|
186
199
|
const secureStore = makeSecureStoreMock();
|
|
187
|
-
const store = loadStore('ios', {
|
|
200
|
+
const store = loadStore('ios', {
|
|
201
|
+
secureStore,
|
|
202
|
+
access: {
|
|
203
|
+
mode: 'grouped',
|
|
204
|
+
prefix: 'ABCDE12345.',
|
|
205
|
+
defaultGroup: 'ABCDE12345.so.oxy.identity',
|
|
206
|
+
role: 'holder',
|
|
207
|
+
},
|
|
208
|
+
});
|
|
188
209
|
await store?.publish(CRED);
|
|
210
|
+
await store?.read();
|
|
211
|
+
await store?.clear();
|
|
189
212
|
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
// this phase exists to end.
|
|
213
|
+
// `accessGroup` is expo-secure-store's real option (`keychainAccessGroup`
|
|
214
|
+
// never was) and must equal the entitlement value exactly. Without the
|
|
215
|
+
// dedicated `keychainService` the item would share a namespace with others.
|
|
194
216
|
for (const call of secureStore.calls) {
|
|
195
|
-
expect(call.options).
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
217
|
+
expect(call.options).toEqual(
|
|
218
|
+
expect.objectContaining({
|
|
219
|
+
keychainService: 'oxy_device_session',
|
|
220
|
+
accessGroup: 'ABCDE12345.group.so.oxy.shared',
|
|
221
|
+
}),
|
|
222
|
+
);
|
|
199
223
|
}
|
|
200
|
-
expect(secureStore.calls.length).toBeGreaterThan(
|
|
224
|
+
expect(secureStore.calls.length).toBeGreaterThan(2);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
test('a build without the keychain probe names no group (its one group is its default)', async () => {
|
|
228
|
+
const secureStore = makeSecureStoreMock();
|
|
229
|
+
const store = loadStore('ios', { secureStore });
|
|
230
|
+
await store?.publish(CRED);
|
|
231
|
+
for (const call of secureStore.calls) {
|
|
232
|
+
expect(call.options).toMatchObject({ keychainService: 'oxy_device_session' });
|
|
233
|
+
expect(call.options).not.toHaveProperty('accessGroup');
|
|
234
|
+
expect(call.options).not.toHaveProperty('keychainAccessGroup');
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
test('a keychain that cannot name its groups yet reads as unavailable, never absent', async () => {
|
|
239
|
+
const secureStore = makeSecureStoreMock();
|
|
240
|
+
const locked = loadStore('ios', { secureStore, access: new Error('locked') });
|
|
241
|
+
expect((await locked?.read())?.state).toBe('unavailable');
|
|
242
|
+
await expect(locked?.publish(CRED)).resolves.toBe(false);
|
|
201
243
|
});
|
|
202
244
|
|
|
203
245
|
test('the item is written device-only so it never rides an OS backup to a new handset', async () => {
|
|
@@ -19,13 +19,30 @@
|
|
|
19
19
|
* evaluates the constant, so Metro resolved it anyway) and only hid it from the
|
|
20
20
|
* gates that read this source.
|
|
21
21
|
*/
|
|
22
|
-
import
|
|
22
|
+
import {
|
|
23
|
+
type NativeKeyValueStorage,
|
|
24
|
+
deleteThroughPlan,
|
|
25
|
+
ownKeychainItemPlan,
|
|
26
|
+
readThroughPlan,
|
|
27
|
+
resolveKeychainAccess,
|
|
28
|
+
} from '@oxy.so/core/session';
|
|
23
29
|
import { createPlatformStorage } from '../utils/storageHelpers';
|
|
24
30
|
|
|
25
31
|
interface SecureStoreLike {
|
|
26
|
-
getItemAsync(key: string): Promise<string | null>;
|
|
27
|
-
setItemAsync(key: string, value: string): Promise<void>;
|
|
28
|
-
deleteItemAsync(key: string): Promise<void>;
|
|
32
|
+
getItemAsync(key: string, options?: object): Promise<string | null>;
|
|
33
|
+
setItemAsync(key: string, value: string, options?: object): Promise<void>;
|
|
34
|
+
deleteItemAsync(key: string, options?: object): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Where this app's own items go on iOS (`ownKeychainItemPlan`,
|
|
39
|
+
* docs/identity/ios-keychain-access-groups.md): in Commons and the Peable
|
|
40
|
+
* wallet, whose default keychain group the access-group split changed, the
|
|
41
|
+
* default group explicitly and first; in every other app the calls it always
|
|
42
|
+
* made. Android and web: no options.
|
|
43
|
+
*/
|
|
44
|
+
async function ownItemPlan() {
|
|
45
|
+
return ownKeychainItemPlan(await resolveKeychainAccess());
|
|
29
46
|
}
|
|
30
47
|
|
|
31
48
|
let secureStorePromise: Promise<SecureStoreLike | null> | null = null;
|
|
@@ -80,14 +97,14 @@ export function createNativeSecureKeyValueStorage(): NativeKeyValueStorage {
|
|
|
80
97
|
getItem: async (key) => {
|
|
81
98
|
const secure = await loadSecureStore();
|
|
82
99
|
if (secure) {
|
|
83
|
-
return secure
|
|
100
|
+
return readThroughPlan(secure, key, {}, (await ownItemPlan()).read);
|
|
84
101
|
}
|
|
85
102
|
return (await getAsyncStorage()).getItem(key);
|
|
86
103
|
},
|
|
87
104
|
setItem: async (key, value) => {
|
|
88
105
|
const secure = await loadSecureStore();
|
|
89
106
|
if (secure) {
|
|
90
|
-
await secure.setItemAsync(key, value);
|
|
107
|
+
await secure.setItemAsync(key, value, (await ownItemPlan()).write);
|
|
91
108
|
return;
|
|
92
109
|
}
|
|
93
110
|
await (await getAsyncStorage()).setItem(key, value);
|
|
@@ -95,7 +112,7 @@ export function createNativeSecureKeyValueStorage(): NativeKeyValueStorage {
|
|
|
95
112
|
removeItem: async (key) => {
|
|
96
113
|
const secure = await loadSecureStore();
|
|
97
114
|
if (secure) {
|
|
98
|
-
await secure
|
|
115
|
+
await deleteThroughPlan(secure, key, {}, (await ownItemPlan()).delete);
|
|
99
116
|
return;
|
|
100
117
|
}
|
|
101
118
|
await (await getAsyncStorage()).removeItem(key);
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
* module owns only where the bytes live, which is genuinely different per
|
|
7
7
|
* platform:
|
|
8
8
|
*
|
|
9
|
-
* - **iOS** — one `expo-secure-store` item in the
|
|
10
|
-
*
|
|
11
|
-
* ({@link IOS_DEVICE_SESSION_KEYCHAIN_SERVICE}).
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
9
|
+
* - **iOS** — one `expo-secure-store` item in the keychain access group every
|
|
10
|
+
* Oxy app holds, `<TEAM>.group.so.oxy.shared`, under its OWN
|
|
11
|
+
* `keychainService` ({@link IOS_DEVICE_SESSION_KEYCHAIN_SERVICE}). The
|
|
12
|
+
* `accessGroup` is the full team-prefixed value `@oxy.so/core` resolves
|
|
13
|
+
* (`resolveKeychainAccess`, docs/identity/ios-keychain-access-groups.md):
|
|
14
|
+
* Commons' DEFAULT group is the identity group, so without it Commons would
|
|
15
|
+
* write this item where no sibling can read it. Identity keys never share
|
|
16
|
+
* this group (they are in the identity and wallet groups), and this item's
|
|
17
|
+
* service aliases none of theirs.
|
|
18
18
|
* - **Android** — the signature-protected `OxyDeviceSession` broker (its own
|
|
19
19
|
* EncryptedSharedPreferences file, its own ContentProvider, its own
|
|
20
20
|
* `signature`-level permission). It carries a session credential; it can NOT
|
|
@@ -39,17 +39,20 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import { Platform } from 'react-native';
|
|
41
41
|
import { requireOptionalNativeModule } from 'expo-modules-core';
|
|
42
|
+
import type { SecureStoreOptions } from 'expo-secure-store';
|
|
42
43
|
import {
|
|
44
|
+
keychainAccessGroupValue,
|
|
43
45
|
normalizeSharedDeviceSessionRead,
|
|
46
|
+
resolveKeychainAccess,
|
|
44
47
|
type SharedDeviceCredential,
|
|
45
48
|
type SharedDeviceCredentialRead,
|
|
46
49
|
type SharedDeviceCredentialStore,
|
|
47
50
|
} from '@oxy.so/core/session';
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
|
-
* The
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
+
* The keychain access group (after the team prefix) every Oxy app declares.
|
|
54
|
+
* The value passed to the keychain is `<TEAM>.` + this; see
|
|
55
|
+
* {@link sharedGroupOptions}.
|
|
53
56
|
*/
|
|
54
57
|
export const IOS_KEYCHAIN_ACCESS_GROUP = 'group.so.oxy.shared';
|
|
55
58
|
|
|
@@ -150,12 +153,21 @@ function parseStoredCredential(raw: string | null): SharedDeviceCredential | nul
|
|
|
150
153
|
* two is what would let a locked phone look like a device that never had a
|
|
151
154
|
* session.
|
|
152
155
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
/**
|
|
157
|
+
* The options of the credential item: its own service, and the shared group's
|
|
158
|
+
* full `accessGroup` (none on a native build whose module predates the probe,
|
|
159
|
+
* whose one shared group is its default anyway). Throws while the keychain
|
|
160
|
+
* cannot say which groups this app holds, which reads as `unavailable`.
|
|
161
|
+
*/
|
|
162
|
+
async function sharedGroupOptions(): Promise<SecureStoreOptions> {
|
|
163
|
+
const accessGroup = keychainAccessGroupValue(await resolveKeychainAccess(), 'shared');
|
|
164
|
+
return {
|
|
155
165
|
keychainService: IOS_DEVICE_SESSION_KEYCHAIN_SERVICE,
|
|
156
|
-
|
|
166
|
+
...(accessGroup ? { accessGroup } : {}),
|
|
157
167
|
};
|
|
168
|
+
}
|
|
158
169
|
|
|
170
|
+
function createKeychainGroupCredentialStore(): SharedDeviceCredentialStore {
|
|
159
171
|
return {
|
|
160
172
|
read: async (): Promise<SharedDeviceCredentialRead> => {
|
|
161
173
|
const store = await loadKeychainGroupStore();
|
|
@@ -164,7 +176,10 @@ function createKeychainGroupCredentialStore(): SharedDeviceCredentialStore {
|
|
|
164
176
|
}
|
|
165
177
|
let raw: string | null;
|
|
166
178
|
try {
|
|
167
|
-
raw = await store.getItemAsync(
|
|
179
|
+
raw = await store.getItemAsync(
|
|
180
|
+
SHARED_DEVICE_SESSION_STORAGE_KEY,
|
|
181
|
+
await sharedGroupOptions(),
|
|
182
|
+
);
|
|
168
183
|
} catch (error) {
|
|
169
184
|
return { state: 'unavailable', cause: error };
|
|
170
185
|
}
|
|
@@ -190,6 +205,7 @@ function createKeychainGroupCredentialStore(): SharedDeviceCredentialStore {
|
|
|
190
205
|
}
|
|
191
206
|
const value = JSON.stringify(credential);
|
|
192
207
|
try {
|
|
208
|
+
const readOptions = await sharedGroupOptions();
|
|
193
209
|
await store.setItemAsync(SHARED_DEVICE_SESSION_STORAGE_KEY, value, {
|
|
194
210
|
...readOptions,
|
|
195
211
|
keychainAccessible: store.WHEN_UNLOCKED_THIS_DEVICE_ONLY,
|
|
@@ -210,7 +226,7 @@ function createKeychainGroupCredentialStore(): SharedDeviceCredentialStore {
|
|
|
210
226
|
return;
|
|
211
227
|
}
|
|
212
228
|
try {
|
|
213
|
-
await store.deleteItemAsync(SHARED_DEVICE_SESSION_STORAGE_KEY,
|
|
229
|
+
await store.deleteItemAsync(SHARED_DEVICE_SESSION_STORAGE_KEY, await sharedGroupOptions());
|
|
214
230
|
} catch {
|
|
215
231
|
// Best-effort: the slot is a join point, not a source of truth.
|
|
216
232
|
}
|
|
@@ -313,7 +329,7 @@ function createBrokerCredentialStore(): SharedDeviceCredentialStore {
|
|
|
313
329
|
*
|
|
314
330
|
* The branch is on the PLATFORM, not on which module happens to load, because
|
|
315
331
|
* `expo-secure-store` loads perfectly well on Android — it would just quietly
|
|
316
|
-
* ignore `
|
|
332
|
+
* ignore `accessGroup` and read a package-private item, which looks
|
|
317
333
|
* exactly like an empty shared slot. This is the same iOS-vs-Android split
|
|
318
334
|
* `KeyManager` makes for the shared identity, for the same reason.
|
|
319
335
|
*
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare module 'expo-secure-store' {
|
|
2
|
-
export interface SecureStoreOptions {
|
|
3
|
-
keychainAccessible?:
|
|
4
|
-
| 'WHEN_UNLOCKED'
|
|
5
|
-
| 'AFTER_FIRST_UNLOCK'
|
|
6
|
-
| 'WHEN_UNLOCKED_THIS_DEVICE_ONLY'
|
|
7
|
-
| 'AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY'
|
|
8
|
-
| 'WHEN_PASSCODE_SET_THIS_DEVICE_ONLY';
|
|
9
|
-
requireAuthentication?: boolean;
|
|
10
|
-
authenticationPrompt?: string;
|
|
11
|
-
showModal?: boolean;
|
|
12
|
-
keychainService?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const WHEN_UNLOCKED: 'WHEN_UNLOCKED';
|
|
16
|
-
export const AFTER_FIRST_UNLOCK: 'AFTER_FIRST_UNLOCK';
|
|
17
|
-
export const WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'WHEN_UNLOCKED_THIS_DEVICE_ONLY';
|
|
18
|
-
export const AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: 'AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY';
|
|
19
|
-
export const WHEN_PASSCODE_SET_THIS_DEVICE_ONLY: 'WHEN_PASSCODE_SET_THIS_DEVICE_ONLY';
|
|
20
|
-
|
|
21
|
-
export function setItemAsync(
|
|
22
|
-
key: string,
|
|
23
|
-
value: string,
|
|
24
|
-
options?: SecureStoreOptions,
|
|
25
|
-
): Promise<void>;
|
|
26
|
-
export function getItemAsync(key: string, options?: SecureStoreOptions): Promise<string | null>;
|
|
27
|
-
export function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise<void>;
|
|
28
|
-
export function isAvailableAsync(): Promise<boolean>;
|
|
29
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare module 'expo-secure-store' {
|
|
2
|
-
export interface SecureStoreOptions {
|
|
3
|
-
keychainAccessible?:
|
|
4
|
-
| 'WHEN_UNLOCKED'
|
|
5
|
-
| 'AFTER_FIRST_UNLOCK'
|
|
6
|
-
| 'WHEN_UNLOCKED_THIS_DEVICE_ONLY'
|
|
7
|
-
| 'AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY'
|
|
8
|
-
| 'WHEN_PASSCODE_SET_THIS_DEVICE_ONLY';
|
|
9
|
-
requireAuthentication?: boolean;
|
|
10
|
-
authenticationPrompt?: string;
|
|
11
|
-
showModal?: boolean;
|
|
12
|
-
keychainService?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const WHEN_UNLOCKED: 'WHEN_UNLOCKED';
|
|
16
|
-
export const AFTER_FIRST_UNLOCK: 'AFTER_FIRST_UNLOCK';
|
|
17
|
-
export const WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'WHEN_UNLOCKED_THIS_DEVICE_ONLY';
|
|
18
|
-
export const AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: 'AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY';
|
|
19
|
-
export const WHEN_PASSCODE_SET_THIS_DEVICE_ONLY: 'WHEN_PASSCODE_SET_THIS_DEVICE_ONLY';
|
|
20
|
-
|
|
21
|
-
export function setItemAsync(
|
|
22
|
-
key: string,
|
|
23
|
-
value: string,
|
|
24
|
-
options?: SecureStoreOptions,
|
|
25
|
-
): Promise<void>;
|
|
26
|
-
export function getItemAsync(key: string, options?: SecureStoreOptions): Promise<string | null>;
|
|
27
|
-
export function deleteItemAsync(key: string, options?: SecureStoreOptions): Promise<void>;
|
|
28
|
-
export function isAvailableAsync(): Promise<boolean>;
|
|
29
|
-
}
|