diff --git a/.changeset/polite-fireants-mate.md b/.changeset/polite-fireants-mate.md new file mode 100644 index 00000000000..da7060abeff --- /dev/null +++ b/.changeset/polite-fireants-mate.md @@ -0,0 +1,5 @@ +--- +'@firebase/auth-compat': patch +--- + +Fix auth scheme reconition in capacitor env diff --git a/packages/auth-compat/src/platform.ts b/packages/auth-compat/src/platform.ts index dc0c5d9ca0c..f1ac4e797b1 100644 --- a/packages/auth-compat/src/platform.ts +++ b/packages/auth-compat/src/platform.ts @@ -51,7 +51,9 @@ function _isHttpOrHttps(): boolean { */ export function _isAndroidOrIosCordovaScheme(ua: string = getUA()): boolean { return !!( - (_getCurrentScheme() === 'file:' || _getCurrentScheme() === 'ionic:') && + (_getCurrentScheme() === 'file:' || + _getCurrentScheme() === 'ionic:' || + _getCurrentScheme() === 'capacitor:') && ua.toLowerCase().match(/iphone|ipad|ipod|android/) ); }