File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,13 +61,26 @@ class FirebaseAppCheckModule extends FirebaseModule {
6161 }
6262 this . native . setTokenAutoRefreshEnabled ( options . isTokenAutoRefreshEnabled ) ;
6363
64+ if ( options . provider === undefined || options . provider . providerOptions === undefined ) {
65+ throw new Error ( 'Invalid configuration: no provider or no provider options defined.' ) ;
66+ }
6467 if ( Platform . OS === 'android' ) {
68+ if ( ! isString ( options . provider . providerOptions . android . provider ) ) {
69+ throw new Error (
70+ 'Invalid configuration: no android provider configured while on android platform.' ,
71+ ) ;
72+ }
6573 return this . native . configureProvider (
6674 options . provider . providerOptions . android . provider ,
6775 options . provider . providerOptions . android . debugToken ,
6876 ) ;
6977 }
7078 if ( Platform . OS === 'ios' || Platform . OS === 'macos' ) {
79+ if ( ! isString ( options . provider . providerOptions . apple . provider ) ) {
80+ throw new Error (
81+ 'Invalid configuration: no apple provider configured while on apple platform.' ,
82+ ) ;
83+ }
7184 return this . native . configureProvider (
7285 options . provider . providerOptions . apple . provider ,
7386 options . provider . providerOptions . apple . debugToken ,
You can’t perform that action at this time.
0 commit comments