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
docs(flutter): Rename Secure Media Access to Token Based File Access
- Update title and sidebarTitle in secure-media-access.mdx
- Rename all references from 'Secure Media Access' to 'Token Based File Access'
- Update URL references from cometchat.com to cometchat.io
- Update overview.mdx, setup.mdx, and send-message.mdx references
- Revert UI Kit changes (will be done in separate branch)
Secure Media Access lets you control how media files (images, videos, audio, documents) are accessed on CometChat's secure media servers. The SDK supports three modes — **Embedded** (FAT appended as a query parameter automatically), **Header-Based** (FAT added in request headers), and **Presigned** (clean URLs where you fetch presigned URLs explicitly). Once Secure Media Access is enabled in the CometChat Dashboard, it cannot be disabled.
40
+
Token Based File Access lets you control how media files (images, videos, audio, documents) are accessed on CometChat's secure media servers. The SDK supports three modes — **Embedded** (FAT appended as a query parameter automatically), **Header-Based** (FAT added in request headers), and **Presigned** (clean URLs where you fetch presigned URLs explicitly). Once Token Based File Access is enabled in the CometChat Dashboard, it cannot be disabled.
Enabling Secure Media Access is **irreversible**. Once you enable this feature in the CometChat Dashboard, it cannot be disabled. All media URLs will require a valid File Access Token (FAT) for access. Make sure your application is ready to handle secure media URLs before enabling.
47
+
Enabling Token Based File Access is **irreversible**. Once you enable this feature in the CometChat Dashboard, it cannot be disabled. All media URLs will require a valid File Access Token (FAT) for access. Make sure your application is ready to handle secure media URLs before enabling.
48
48
</Warning>
49
49
50
50
## Prerequisites
51
51
52
-
Before using Secure Media Access in your application, ensure the following:
52
+
Before using Token Based File Access in your application, ensure the following:
53
53
54
54
1.**Enable in Dashboard:** Navigate to your CometChat Dashboard → **Chats** → **Settings** and enable the **Token Based File Access** configuration. This is a one-time setup step that activates token-based media access for your app.
55
55
56
56
2.**SDK Initialization:** Your application must initialize the CometChat SDK with a valid App ID and region before configuring secure media modes. See [Setup](/sdk/flutter/setup) for details.
57
57
58
58
<Warning>
59
-
Once Secure Media Access is enabled, all media URLs served by CometChat's secure media servers require a valid **File Access Token (FAT)** for access. Any request to a media URL without a valid FAT will receive a **401 Unauthorized** response. Ensure your application handles secure media URLs before enabling this feature.
59
+
Once Token Based File Access is enabled, all media URLs served by CometChat's secure media servers require a valid **File Access Token (FAT)** for access. Any request to a media URL without a valid FAT will receive a **401 Unauthorized** response. Ensure your application handles secure media URLs before enabling this feature.
60
60
</Warning>
61
61
62
62
## Secure Media Modes
@@ -231,7 +231,7 @@ try {
231
231
232
232
## How Attachment URLs Differ
233
233
234
-
When Secure Media Access is enabled, the format of media attachment URLs depends on the configured mode. Understanding this difference is important for rendering media correctly in your application.
234
+
When Token Based File Access is enabled, the format of media attachment URLs depends on the configured mode. Understanding this difference is important for rendering media correctly in your application.
235
235
236
236
### Embedded Mode
237
237
@@ -290,7 +290,7 @@ In **Embedded Mode**, you can use attachment URLs directly from message objects.
290
290
291
291
## API Reference
292
292
293
-
The following static members are available on the `CometChat` class for working with Secure Media Access:
293
+
The following static members are available on the `CometChat` class for working with Token Based File Access:
294
294
295
295
| Member | Type | Description |
296
296
| --- | --- | --- |
@@ -407,11 +407,11 @@ if (needsSecure) {
407
407
408
408
## Error Handling
409
409
410
-
When working with Secure Media Access, handle these common error scenarios gracefully in your application.
410
+
When working with Token Based File Access, handle these common error scenarios gracefully in your application.
411
411
412
412
### Feature Not Enabled
413
413
414
-
If Secure Media Access is not enabled in the CometChat Dashboard, calling `CometChat.fetchPresignedUrl()` will not throw an error — it simply returns the same URL string that was passed in. Media URLs work normally without a File Access Token in this case.
414
+
If Token Based File Access is not enabled in the CometChat Dashboard, calling `CometChat.fetchPresignedUrl()` will not throw an error — it simply returns the same URL string that was passed in. Media URLs work normally without a File Access Token in this case.
415
415
416
416
<Tabs>
417
417
<Tabtitle="Callback">
@@ -594,7 +594,7 @@ loadSecureMedia(mediaUrl);
594
594
**Symptom:** Media files fail to load and the server returns a 401 Unauthorized response.
595
595
596
596
**Possible causes:**
597
-
- Secure Media Access is enabled in the Dashboard but the SDK is not configured with a secure media mode.
597
+
- Token Based File Access is enabled in the Dashboard but the SDK is not configured with a secure media mode.
598
598
- The File Access Token (FAT) has expired or is missing.
599
599
- In Header-Based Mode, you are not including the FAT in request headers.
600
600
- In Presigned Mode, you are using the raw media URL instead of a presigned URL.
Copy file name to clipboardExpand all lines: sdk/flutter/send-message.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ To send a media message to any user or group, you need to use the `sendMediaMess
191
191
192
192
<Note>
193
193
194
-
If [Secure Media Access](/sdk/flutter/secure-media-access) is enabled for your app, media URLs returned by the SDK may require token-based access. Depending on the configured mode, the SDK either appends a File Access Token (FAT) automatically, requires you to add the FAT to request headers, or requires you to fetch a presigned URL before rendering media. See the [Secure Media Access](/sdk/flutter/secure-media-access) guide for details.
194
+
If [Token Based File Access](/sdk/flutter/secure-media-access) is enabled for your app, media URLs returned by the SDK may require token-based access. Depending on the configured mode, the SDK either appends a File Access Token (FAT) automatically, requires you to add the FAT to request headers, or requires you to fetch a presigned URL before rendering media. See the [Token Based File Access](/sdk/flutter/secure-media-access) guide for details.
Copy file name to clipboardExpand all lines: sdk/flutter/setup.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The `AppSettings` class allows you to configure three settings:
99
99
***autoEstablishSocketConnection(boolean value)**: This property takes a boolean value which when set to true informs the SDK to manage the web-socket connection internally. If set to false, it informs the SDK that the web-socket connection will be managed manually. The default value for this parameter is true. For more information on this, please check the [Connection Behaviour](/sdk/flutter/connection-behaviour) section. The default value for this property is **true.**
100
100
***adminHost(adminHost: string)**: This method takes the admin URL as input and uses this admin URL instead of the default admin URL. This can be used in case of dedicated deployment of CometChat.
101
101
***clientHost(clientHost: string)**: This method takes the client URL as input and uses this client URL instead of the default client URL. This can be used in case of dedicated deployment of CometChat.
102
-
***secureMediaMode(SecureMediaMode mode)**: This method sets the secure media access mode for handling media file URLs. See the [Secure Media Access](/sdk/flutter/secure-media-access) guide for details on available modes and configuration.
102
+
***secureMediaMode(SecureMediaMode mode)**: This method sets the secure media access mode for handling media file URLs. See the [Token Based File Access](/sdk/flutter/secure-media-access) guide for details on available modes and configuration.
Copy file name to clipboardExpand all lines: ui-kit/flutter/core-features.mdx
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,6 @@ Beyond text, CometChat allows users to share various media types within their co
34
34
|[MessageComposer](/ui-kit/flutter/message-composer)|[MessageComposer](/ui-kit/flutter/message-composer) is a Widget that has ActionSheet, ActionSheet is a menu that appears over the context of the app, providing multiple options for sharing media files. |
35
35
|[MessageList](/ui-kit/flutter/message-list)|[MessageList](/ui-kit/flutter/message-list) is a Widget that renders different Media Message bubbles like [Image Bubble](/ui-kit/flutter/message-bubble-styling-styling#image-bubble), [File Bubble](/ui-kit/flutter/message-bubble-styling-styling#file-bubble), [Audio Bubble](/ui-kit/flutter/message-bubble-styling-styling#audio-bubble)[Video Bubble](/ui-kit/flutter/message-bubble-styling#video-bubble)|
36
36
37
-
<Note>
38
-
For secure media access using presigned URLs, you can enable Header-Based or Presigned mode during initialization. See [Setting Secure Media Mode](/ui-kit/flutter/methods#setting-secure-media-mode) for configuration details.
39
-
</Note>
40
-
41
37
## Read Receipts
42
38
43
39
CometChat's Read Receipts feature provides visibility into the message status, letting users know when a message has been delivered and read. This brings clarity to the communication and ensures users are informed about the status of their messages.
Copy file name to clipboardExpand all lines: ui-kit/flutter/getting-started.mdx
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ To get started, create a new flutter application project.
53
53
To use this UI Kit in your Flutter project, you'll need to add the following dependency to the dependencies section of your `pubspec.yaml` file:
54
54
55
55
```yaml pubspec.yaml
56
-
cometchat_chat_uikit: ^5.2.10
56
+
cometchat_chat_uikit: ^5.2.8
57
57
cometchat_calls_uikit: ^5.0.12 #Optional: Include if you're using Audio/Video Calling
58
58
```
59
59
@@ -74,7 +74,7 @@ Final `pubspec.yaml`
74
74
flutter:
75
75
sdk: flutter
76
76
77
-
cometchat_chat_uikit: ^5.2.10
77
+
cometchat_chat_uikit: ^5.2.8
78
78
cometchat_calls_uikit: ^5.0.12 #Optional: Include if you're using Audio/Video Calling
79
79
cupertino_icons: ^1.0.8
80
80
@@ -170,12 +170,6 @@ Before using any features from the CometChat UI Kit, initialize it with your app
170
170
171
171
> Store your CometChat credentials in a config file to simplify environment management and avoid hardcoding.
172
172
173
-
<Note>
174
-
175
-
You can configure secure media access during initialization using `UIKitSettingsBuilder`. To enable presigned URL-based media access, see [Setting Secure Media Mode](/ui-kit/flutter/methods#setting-secure-media-mode).
Copy file name to clipboardExpand all lines: ui-kit/flutter/methods.mdx
-76Lines changed: 0 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,6 @@ Here's the table format for the properties available in `UIKitSettings`:
40
40
|**autoEstablishSocketConnection**|`Boolean`| Configures if web socket connections will established automatically on app initialization or be done manually, set to true by default |
41
41
|**aiFeature**|`List<AIExtensionDataSource>`| Sets the AI Features that need to be added in UI Kit |
42
42
|**extensions**|`List<ExtensionsDataSource>`| Sets the list of extension that need to be added in UI Kit |
43
-
|**secureMediaMode**|`SecureMediaMode`| Sets the secure media access mode for handling media file URLs. Options: `embedded`, `headerBased`, `presigned`. See [Secure Media Access](/sdk/flutter/secure-media-access) for details. |
CometChat supports three modes for accessing media files. In **embedded** mode (the default), media URLs include a query-parameter token automatically and no extra steps are needed. In **headerBased** mode, the FAT token is added to request headers for media access. In **presigned** mode, media URLs are resolved via presigned URLs using `CometChat.fetchPresignedUrl(url)`, providing enhanced security for media access.
For more details on secure media access modes and how to handle media URLs in your application, see the [Secure Media Access](/sdk/flutter/secure-media-access) guide.
144
-
</Note>
145
-
146
-
***
147
-
148
72
### Login using Auth Key
149
73
150
74
Only the `UID` of a user is needed to log in. This simple authentication procedure is useful when you are creating a POC or if you are in the development phase. For production apps, we suggest you use [AuthToken](#login-using-auth-token) instead of Auth Key.
0 commit comments