Skip to content

Commit e378140

Browse files
committed
s/useLimitedUseAppCheckToken/limitedUseAppCheckTokens/g
1 parent 178e420 commit e378140

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

common/api-review/functions.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export function httpsCallableFromURL<RequestData = unknown, ResponseData = unkno
4343

4444
// @public
4545
export interface HttpsCallableOptions {
46+
limitedUseAppCheckTokens?: boolean;
4647
timeout?: number;
47-
useLimitedUseAppCheckToken?: boolean;
4848
}
4949

5050
// @public

docs-devsite/functions.httpscallableoptions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ export interface HttpsCallableOptions
2222

2323
| Property | Type | Description |
2424
| --- | --- | --- |
25+
| [limitedUseAppCheckTokens](./functions.httpscallableoptions.md#httpscallableoptionslimiteduseappchecktokens) | boolean | If set to true, uses limited-use App Check token for callable function requests from this instance of [Functions](./functions.functions.md#functions_interface)<!-- -->. You must use limited-use tokens to call functions with replay protection enabled. By default, this is false. |
2526
| [timeout](./functions.httpscallableoptions.md#httpscallableoptionstimeout) | number | Time in milliseconds after which to cancel if there is no response. Default is 70000. |
26-
| [useLimitedUseAppCheckToken](./functions.httpscallableoptions.md#httpscallableoptionsuselimiteduseappchecktoken) | boolean | If set to true, uses limited-use App Check token for callable function requests from this instance of [Functions](./functions.functions.md#functions_interface)<!-- -->. You must use limited-use tokens to call functions with replay protection enabled. By default, this is false. |
2727

28-
## HttpsCallableOptions.timeout
28+
## HttpsCallableOptions.limitedUseAppCheckTokens
2929

30-
Time in milliseconds after which to cancel if there is no response. Default is 70000.
30+
If set to true, uses limited-use App Check token for callable function requests from this instance of [Functions](./functions.functions.md#functions_interface)<!-- -->. You must use limited-use tokens to call functions with replay protection enabled. By default, this is false.
3131

3232
<b>Signature:</b>
3333

3434
```typescript
35-
timeout?: number;
35+
limitedUseAppCheckTokens?: boolean;
3636
```
3737

38-
## HttpsCallableOptions.useLimitedUseAppCheckToken
38+
## HttpsCallableOptions.timeout
3939

40-
If set to true, uses limited-use App Check token for callable function requests from this instance of [Functions](./functions.functions.md#functions_interface)<!-- -->. You must use limited-use tokens to call functions with replay protection enabled. By default, this is false.
40+
Time in milliseconds after which to cancel if there is no response. Default is 70000.
4141

4242
<b>Signature:</b>
4343

4444
```typescript
45-
useLimitedUseAppCheckToken?: boolean;
45+
timeout?: number;
4646
```

packages/functions/src/callable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ describe('Firebase Functions > Call', () => {
196196
// Stub out the internals to get an app check token.
197197
const stub = sinon.stub(appCheckMock, 'getLimitedUseToken').callThrough();
198198
const func = httpsCallable(functions, 'appCheckTest', {
199-
useLimitedUseAppCheckToken: true
199+
limitedUseAppCheckTokens: true
200200
});
201201
const result = await func({});
202202
expect(result.data).to.deep.equal({ token: 'app-check-single-use-token' });

packages/functions/src/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ export class ContextProvider {
120120
}
121121

122122
async getAppCheckToken(
123-
useLimitedUseAppCheckToken?: boolean
123+
limitedUseAppCheckTokens?: boolean
124124
): Promise<string | null> {
125125
if (this.appCheck) {
126-
const result = useLimitedUseAppCheckToken
126+
const result = limitedUseAppCheckTokens
127127
? await this.appCheck.getLimitedUseToken()
128128
: await this.appCheck.getToken();
129129
if (result.error) {
@@ -137,11 +137,11 @@ export class ContextProvider {
137137
return null;
138138
}
139139

140-
async getContext(useLimitedUseAppCheckToken?: boolean): Promise<Context> {
140+
async getContext(limitedUseAppCheckTokens?: boolean): Promise<Context> {
141141
const authToken = await this.getAuthToken();
142142
const messagingToken = await this.getMessagingToken();
143143
const appCheckToken = await this.getAppCheckToken(
144-
useLimitedUseAppCheckToken
144+
limitedUseAppCheckTokens
145145
);
146146
return { authToken, messagingToken, appCheckToken };
147147
}

packages/functions/src/public-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface HttpsCallableOptions {
5252
* instance of {@link Functions}. You must use limited-use tokens to call functions with
5353
* replay protection enabled. By default, this is false.
5454
*/
55-
useLimitedUseAppCheckToken?: boolean;
55+
limitedUseAppCheckTokens?: boolean;
5656
}
5757

5858
/**

packages/functions/src/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ async function callAtURL(
278278
// Add a header for the authToken.
279279
const headers: { [key: string]: string } = {};
280280
const context = await functionsInstance.contextProvider.getContext(
281-
options.useLimitedUseAppCheckToken
281+
options.limitedUseAppCheckTokens
282282
);
283283
if (context.authToken) {
284284
headers['Authorization'] = 'Bearer ' + context.authToken;

0 commit comments

Comments
 (0)