File tree Expand file tree Collapse file tree 4 files changed +32
-6
lines changed
snippets/appcheck-next/index Expand file tree Collapse file tree 4 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ function initialize() {
13
13
// Pass your reCAPTCHA v3 site key (public key) to activate(). Make sure this
14
14
// key is the counterpart to the secret key you set in the Firebase console.
15
15
const appCheck = initializeAppCheck ( app , {
16
- provider : new ReCaptchaV3Provider ( 'abcdefghijklmnopqrstuvwxy-1234567890abcd' )
16
+ provider : new ReCaptchaV3Provider ( 'abcdefghijklmnopqrstuvwxy-1234567890abcd' ) ,
17
+
18
+ // Optional argument. If true, the SDK automatically refreshes App Check
19
+ // tokens as needed.
20
+ isTokenAutoRefreshEnabled : true
17
21
} ) ;
18
22
// [END appcheck_initialize]
19
23
}
@@ -59,7 +63,11 @@ function initializeCustomProvider() {
59
63
} ) ;
60
64
61
65
const appCheck = initializeAppCheck ( app , {
62
- provider : appCheckCustomProvider
66
+ provider : appCheckCustomProvider ,
67
+
68
+ // Optional argument. If true, the SDK automatically refreshes App Check
69
+ // tokens as needed.
70
+ isTokenAutoRefreshEnabled : true
63
71
} ) ;
64
72
// [END appcheck_initialize_custom_provider]
65
73
}
Original file line number Diff line number Diff line change @@ -10,7 +10,12 @@ function initialize() {
10
10
const appCheck = firebase . appCheck ( ) ;
11
11
// Pass your reCAPTCHA v3 site key (public key) to activate(). Make sure this
12
12
// key is the counterpart to the secret key you set in the Firebase console.
13
- appCheck . activate ( 'abcdefghijklmnopqrstuvwxy-1234567890abcd' ) ;
13
+ appCheck . activate (
14
+ 'abcdefghijklmnopqrstuvwxy-1234567890abcd' ,
15
+
16
+ // Optional argument. If true, the SDK automatically refreshes App Check
17
+ // tokens as needed.
18
+ true ) ;
14
19
// [END appcheck_initialize]
15
20
}
16
21
@@ -50,7 +55,12 @@ function initializeCustomProvider() {
50
55
} ) ;
51
56
52
57
const appCheck = firebase . appCheck ( ) ;
53
- appCheck . activate ( appCheckCustomProvider ) ;
58
+ appCheck . activate (
59
+ appCheckCustomProvider ,
60
+
61
+ // Optional argument. If true, the SDK automatically refreshes App Check
62
+ // tokens as needed.
63
+ true ) ;
54
64
// [END appcheck_initialize_custom_provider]
55
65
}
56
66
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ const app = initializeApp({
14
14
// Pass your reCAPTCHA v3 site key (public key) to activate(). Make sure this
15
15
// key is the counterpart to the secret key you set in the Firebase console.
16
16
const appCheck = initializeAppCheck ( app , {
17
- provider : new ReCaptchaV3Provider ( 'abcdefghijklmnopqrstuvwxy-1234567890abcd' )
17
+ provider : new ReCaptchaV3Provider ( 'abcdefghijklmnopqrstuvwxy-1234567890abcd' ) ,
18
+
19
+ // Optional argument. If true, the SDK automatically refreshes App Check
20
+ // tokens as needed.
21
+ isTokenAutoRefreshEnabled : true
18
22
} ) ;
19
23
// [END appcheck_initialize_modular]
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ const app = initializeApp({
12
12
} ) ;
13
13
14
14
const appCheck = initializeAppCheck ( app , {
15
- provider : appCheckCustomProvider
15
+ provider : appCheckCustomProvider ,
16
+
17
+ // Optional argument. If true, the SDK automatically refreshes App Check
18
+ // tokens as needed.
19
+ isTokenAutoRefreshEnabled : true
16
20
} ) ;
17
21
// [END appcheck_initialize_custom_provider_modular]
You can’t perform that action at this time.
0 commit comments