Skip to content

Commit 37dfe26

Browse files
committed
Update FirebaseAI.kt
1 parent 64b488f commit 37dfe26

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,13 @@ internal constructor(
231231
*
232232
* @param backend the backend reference to make generative AI requests to.
233233
* @param useLimitedUseAppCheckTokens when sending tokens to the backend, this option enables
234-
* the usage of App Check's limited-use tokens instead of the standard cached tokens.
235-
*
236-
* A new limited-use tokens will be generated for each request; providing a smaller attack
237-
* surface for malicious parties to hijack tokens. When used alongside replay protection,
238-
* limited-use tokens are also _consumed_ after each request, ensuring they can't be used again.
234+
* the usage of App Check's limited-use tokens instead of the standard cached tokens. Learn
235+
* more about [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check),
236+
* including their nuances, when to use them, and best practices for integrating them into your
237+
* app.
239238
*
240239
* _This flag is set to `false` by default._
241-
*
242-
* **Important:** Replay protection is not currently supported for the FirebaseAI backend. While
243-
* this feature is being developed, you can still migrate to using limited-use tokens. Because
244-
* limited-use tokens are backwards compatible, you can still use them without replay
245-
* protection. Due to their shorter TTL over standard App Check tokens, they still provide a
246-
* security benefit. Migrating to limited-use tokens sooner minimizes disruption when support
247-
* for replay protection is added.
248240
*/
249-
// TODO(b/440356335): Update docs above when web page goes live in M170
250241
@JvmStatic
251242
@JvmOverloads
252243
public fun getInstance(
@@ -290,7 +281,8 @@ public fun Firebase.ai(
290281
*
291282
* @param backend the backend reference to make generative AI requests to.
292283
* @param useLimitedUseAppCheckTokens use App Check's limited-use tokens when sending requests to
293-
* the backend. To learn more about what this means, see the full docs on [FirebaseAI.getInstance].
284+
* the backend. Learn more about [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check),
285+
* including their nuances, when to use them, and best practices for integrating them into your app.
294286
*/
295287
// TODO(b/440356335): Update docs above when web page goes live in M170
296288
public fun Firebase.ai(

0 commit comments

Comments
 (0)