File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
packages-exp/app-check-exp/src Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
import { registerVersion , _registerComponent } from '@firebase/app-exp' ;
18
- import { Component , ComponentType } from '@firebase/component' ;
18
+ import {
19
+ Component ,
20
+ ComponentType ,
21
+ InstantiationMode
22
+ } from '@firebase/component' ;
19
23
import { _AppCheckComponentName } from './public-types' ;
20
24
import { factory , internalFactory } from './factory' ;
21
25
import { initializeDebugMode } from './debug' ;
@@ -44,6 +48,16 @@ function registerAppCheck(): void {
44
48
} ,
45
49
ComponentType . PUBLIC
46
50
)
51
+ . setInstantiationMode ( InstantiationMode . EXPLICIT )
52
+ /**
53
+ * Initialize app-check-internal after app-check is initialized to make AppCheck available to
54
+ * other Firebase SDKs
55
+ */
56
+ . setInstanceCreatedCallback (
57
+ ( container , _identifier , _appcheckService ) => {
58
+ container . getProvider ( APP_CHECK_NAME_INTERNAL ) . initialize ( ) ;
59
+ }
60
+ )
47
61
) ;
48
62
49
63
// The internal interface used by other Firebase products
@@ -55,7 +69,7 @@ function registerAppCheck(): void {
55
69
return internalFactory ( appCheck ) ;
56
70
} ,
57
71
ComponentType . PUBLIC
58
- )
72
+ ) . setInstantiationMode ( InstantiationMode . EXPLICIT )
59
73
) ;
60
74
61
75
registerVersion ( name , version ) ;
You can’t perform that action at this time.
0 commit comments