Skip to content

Commit 465006e

Browse files
committed
Add docs for app check extension
1 parent d342829 commit 465006e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

FirebaseAI/Sources/Types/Internal/AppCheck.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@
1414

1515
import FirebaseAppCheckInterop
1616

17-
// TODO: document
17+
/// Internal helper extension for fetching app check tokens.
18+
///
19+
/// Provides a common means for fetching limited use tokens, and falling back to standard tokens
20+
/// when it's disabled (or in debug mode). This also centrializes the error, since this method is
21+
/// used in multiple places.
1822
extension AppCheckInterop {
19-
// TODO: Document
23+
/// Fetch the appcheck token.
24+
///
25+
/// - Parameters:
26+
/// - limitedUse: Should the token be a limited-use token, or a standard token.
27+
/// - domain: A string dictating where this method is being called from. Used in any thrown
28+
/// errors, to avoid hard-to-parse traces.
2029
func fetchAppCheckToken(limitedUse: Bool,
2130
domain: String) async throws -> FIRAppCheckTokenResultInterop {
2231
if limitedUse {

0 commit comments

Comments
 (0)