Skip to content

Commit 942d67b

Browse files
committed
fix app check getToken docs
1 parent c6a8851 commit 942d67b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/app-check/src/api.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,11 @@ export function setTokenAutoRefreshEnabled(
187187
state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled;
188188
}
189189
/**
190-
* Get the current App Check token. Attaches to the most recent
191-
* in-flight request if one is present. Returns null if no token
192-
* is present and no token requests are in-flight.
190+
* Get the current App Check token. If `forceRefresh` is false, it first
191+
* checks for a valid token in memory, then local persistence (IndexedDB).
192+
* If not found, or if `forceRefresh` is true, it makes a request to the
193+
* App Check endpoint for a fresh token. That request attaches
194+
* to the most recent in-flight request if one is present.
193195
*
194196
* @param appCheckInstance - The App Check service instance.
195197
* @param forceRefresh - If true, will always try to fetch a fresh token.

0 commit comments

Comments
 (0)