Skip to content

Commit 82c4fc9

Browse files
committed
Deprecate authpolicy.
1 parent bcac255 commit 82c4fc9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/common/providers/https.ts

+1
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ export interface CallableOptions<T = any> {
710710
cors: cors.CorsOptions;
711711
enforceAppCheck?: boolean;
712712
consumeAppCheckToken?: boolean;
713+
/* @deprecated */
713714
authPolicy?: (token: AuthData | null, data: T) => boolean | Promise<boolean>;
714715
/**
715716
* Time in seconds between sending heartbeat messages to keep the connection

src/v2/providers/https.ts

+6
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ export interface CallableOptions<T = any> extends HttpsOptions {
210210
heartbeatSeconds?: number | null;
211211

212212
/**
213+
* @deprecated
214+
*
213215
* Callback for whether a request is authorized.
214216
*
215217
* Designed to allow reusable auth policies to be passed as an options object. Two built-in reusable policies exist:
@@ -219,6 +221,8 @@ export interface CallableOptions<T = any> extends HttpsOptions {
219221
}
220222

221223
/**
224+
* @deprecated
225+
*
222226
* An auth policy that requires a user to be signed in.
223227
*/
224228
export const isSignedIn =
@@ -227,6 +231,8 @@ export const isSignedIn =
227231
!!auth;
228232

229233
/**
234+
* @deprecated
235+
*
230236
* An auth policy that requires a user to be both signed in and have a specific claim (optionally with a specific value)
231237
*/
232238
export const hasClaim =

0 commit comments

Comments
 (0)