File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ import {
2525 effect ,
2626 Signal ,
2727 ElementRef ,
28+ Optional ,
29+ PLATFORM_ID ,
2830} from "@angular/core" ;
31+ import { isPlatformBrowser } from "@angular/common" ;
2932import { FirebaseApps } from "@angular/fire/app" ;
33+ import { Auth } from "@angular/fire/auth" ;
3034import {
3135 createEmailLinkAuthFormSchema ,
3236 createForgotPasswordAuthFormSchema ,
@@ -60,6 +64,7 @@ export function provideFirebaseUI(uiFactory: (apps: FirebaseApps) => FirebaseUIS
6064 // see https://github.com/angular/angularfire/blob/35e0a9859299010488852b1826e4083abe56528f/src/firestore/firestore.module.ts#L76
6165 {
6266 provide : FIREBASE_UI_STORE ,
67+ deps : [ FirebaseApps , [ new Optional ( ) , Auth ] ] ,
6368 useFactory : ( ) => {
6469 const apps = inject ( FirebaseApps ) ;
6570 if ( ! apps || apps . length === 0 ) {
@@ -92,7 +97,12 @@ export function injectUI() {
9297
9398export function injectRecaptchaVerifier ( element : ( ) => ElementRef < HTMLDivElement > ) {
9499 const ui = injectUI ( ) ;
100+ const platformId = inject ( PLATFORM_ID ) ;
101+
95102 const verifier = computed ( ( ) => {
103+ if ( ! isPlatformBrowser ( platformId ) ) {
104+ return null ;
105+ }
96106 const elementRef = element ( ) ;
97107 if ( ! elementRef ) {
98108 return null ;
You can’t perform that action at this time.
0 commit comments