Skip to content

Commit b6196d2

Browse files
authored
fix: Auth env detection for capacitor (#6236)
* fix: for capacitor * Update platform.ts * Update platform.ts * fix: lint * fix: lint * fix: lint issue in CI * add changeset
1 parent 5d5d6ec commit b6196d2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/polite-fireants-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth-compat': patch
3+
---
4+
5+
Fix auth scheme reconition in capacitor env

packages/auth-compat/src/platform.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ function _isHttpOrHttps(): boolean {
5151
*/
5252
export function _isAndroidOrIosCordovaScheme(ua: string = getUA()): boolean {
5353
return !!(
54-
(_getCurrentScheme() === 'file:' || _getCurrentScheme() === 'ionic:') &&
54+
(_getCurrentScheme() === 'file:' ||
55+
_getCurrentScheme() === 'ionic:' ||
56+
_getCurrentScheme() === 'capacitor:') &&
5557
ua.toLowerCase().match(/iphone|ipad|ipod|android/)
5658
);
5759
}

0 commit comments

Comments
 (0)