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 1515 * limitations under the License.
1616 */
1717import { 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' ;
1923import { _AppCheckComponentName } from './public-types' ;
2024import { factory , internalFactory } from './factory' ;
2125import { initializeDebugMode } from './debug' ;
@@ -44,6 +48,16 @@ function registerAppCheck(): void {
4448 } ,
4549 ComponentType . PUBLIC
4650 )
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+ )
4761 ) ;
4862
4963 // The internal interface used by other Firebase products
@@ -55,7 +69,7 @@ function registerAppCheck(): void {
5569 return internalFactory ( appCheck ) ;
5670 } ,
5771 ComponentType . PUBLIC
58- )
72+ ) . setInstantiationMode ( InstantiationMode . EXPLICIT )
5973 ) ;
6074
6175 registerVersion ( name , version ) ;
You can’t perform that action at this time.
0 commit comments