Skip to content

Commit 016b022

Browse files
committed
feat(app-check): validate limitedUse parameter in exchangeToken()
1 parent bae31aa commit 016b022

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app-check/app-check-api-client-internal.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ export class AppCheckApiClient {
7373
'invalid-argument',
7474
'`customToken` must be a non-empty string.');
7575
}
76+
if (typeof limitedUse !== 'undefined' && !validator.isBoolean(limitedUse)) {
77+
throw new FirebaseAppCheckError(
78+
'invalid-argument',
79+
'`limitedUse` must be a boolean value.');
80+
}
7681
return this.getUrl(appId)
7782
.then((url) => {
7883
const request: HttpRequestConfig = {

0 commit comments

Comments
 (0)