You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/docs/pages/sdks/mobile/react-native/features.mdx
+35-30Lines changed: 35 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ To access certain features of the DevRev SDK, user identification is required.
6
6
7
7
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID:)` method.
8
8
9
-
<Calloutintent="note">
9
+
<Calloutintent="tip">
10
10
On iOS, if you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.
11
11
</Callout>
12
12
13
-
<Calloutintent="note">
13
+
<Calloutintent="tip">
14
14
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be used. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
15
15
</Callout>
16
16
@@ -41,25 +41,30 @@ The steps to identify a verified user are as follows:
41
41
2. Exchange your AAT for a session token for each user of your system.
42
42
3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(_:sessionToken:)` method.
43
43
44
-
> [!CAUTION]
45
-
> For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
44
+
<Calloutintent="warning">
45
+
For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
46
+
</Callout>
46
47
47
48
#### Generate an AAT
48
49
49
50
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
50
51
2. Open the **PLuG Tokens** page.
51
52
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
52
53
53
-
> [!IMPORTANT]
54
-
> Ensure that you copy the generated application access token, as you cannot view it again.
54
+
<Calloutintent="warning">
55
+
Ensure that you copy the generated application access token, as you cannot view it again.
56
+
</Callout>
55
57
56
58
#### Exchange your AAT for a session token
57
59
58
60
In order to proceed with identifying the user, you need to exchange your AAT for a session token. This step will help you identify a user of your own system within the DevRev platform.
59
61
60
62
Here is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:
61
-
> [!CAUTION]
62
-
> Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
63
+
64
+
<Calloutintent="warning">
65
+
Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
The response of the API call will contain a session token that you can use with the verified identification method in your app.
77
82
78
-
> [!NOTE]
79
-
> As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
83
+
<Calloutintent="warning">
84
+
As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
85
+
</Callout>
80
86
81
87
#### Identifying the verified user
82
88
@@ -94,7 +100,7 @@ You can update the user's information using the following method:
94
100
DevRev.updateUser(identity: Identity)
95
101
```
96
102
97
-
<Calloutintent="note">
103
+
<Calloutintent="warning">
98
104
The `userID` property cannot be updated.
99
105
</Callout>
100
106
@@ -122,15 +128,18 @@ The `Identity` class contains the following properties:
122
128
|`organizationTraits`|`OrganizationTraits?`| ❌ | Additional information about the organization |
123
129
|`accountTraits`|`AccountTraits?`| ❌ | Additional information about the account |
124
130
125
-
> [!NOTE]
126
-
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
131
+
<Calloutintent="note">
132
+
The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
133
+
</Callout>
127
134
128
135
##### UserTraits
129
136
130
137
The `UserTraits` class contains detailed information about the user:
131
138
132
-
> [!NOTE]
133
-
> All properties in `UserTraits` are optional.
139
+
<Calloutintent="note">
140
+
All properties in `UserTraits` are optional.
141
+
</Callout>
142
+
134
143
| Property | Type | Description |
135
144
|----------|------|-------------|
136
145
|`displayName`|`string?`| The displayed name of the user |
@@ -143,8 +152,10 @@ The `UserTraits` class contains detailed information about the user:
143
152
144
153
The `OrganizationTraits` class contains detailed information about the organization:
145
154
146
-
> [!NOTE]
147
-
> All properties in `OrganizationTraits` are optional.
155
+
<Calloutintent="note">
156
+
All properties in `OrganizationTraits` are optional.
157
+
</Callout>
158
+
148
159
| Property | Type | Description |
149
160
|----------|------|-------------|
150
161
|`displayName`|`string?`| The displayed name of the organization |
@@ -158,8 +169,10 @@ The `OrganizationTraits` class contains detailed information about the organizat
158
169
159
170
The `AccountTraits` class contains detailed information about the account:
160
171
161
-
> [!NOTE]
162
-
> All properties in `AccountTraits` are optional.
172
+
<Calloutintent="note">
173
+
All properties in `AccountTraits` are optional.
174
+
</Callout>
175
+
163
176
| Property | Type | Description |
164
177
|----------|------|-------------|
165
178
|`displayName`|`string?`| The displayed name of the account |
@@ -174,10 +187,6 @@ The `AccountTraits` class contains detailed information about the account:
174
187
175
188
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.
176
189
177
-
<Calloutintent="note">
178
-
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
179
-
</Callout>
180
-
181
190
```typescript
182
191
DevRev.showSupport()
183
192
```
@@ -202,8 +211,8 @@ Setting this flag to true applies the system's default behavior for opening link
202
211
203
212
### In-app link callback
204
213
205
-
<Calloutintent="note">
206
-
This feature is for Android only.
214
+
<Calloutintent="tip">
215
+
This feature is supported only on Android.
207
216
</Callout>
208
217
209
218
For scenarios where custom handling is needed, links from the support chat can be captured with the following method:
0 commit comments