Skip to content

Commit fdc51dd

Browse files
authored
Fix import path for Cordova (#240)
1 parent dc8dcdd commit fdc51dd

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

auth-next/cordova.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
function createGoogleProvider() {
77
// [START auth_create_google_provider]
8-
const { GoogleAuthProvider } = require("firebase/auth");
8+
const { GoogleAuthProvider } = require("firebase/auth/cordova");
99

1010
const provider = new GoogleAuthProvider();
1111
// [END auth_create_google_provider]
1212
}
1313

1414
function cordovaSignInRedirect() {
1515
// [START auth_cordova_sign_in_redirect]
16-
const { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } = require("firebase/auth");
16+
const { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } = require("firebase/auth/cordova");
1717

1818
const auth = getAuth();
1919
signInWithRedirect(auth, new GoogleAuthProvider())
@@ -40,7 +40,7 @@ function cordovaSignInRedirect() {
4040

4141
function cordovaRedirectResult() {
4242
// [START auth_cordova_redirect_result]
43-
const { getAuth, getRedirectResult, GoogleAuthProvider } = require("firebase/auth");
43+
const { getAuth, getRedirectResult, GoogleAuthProvider } = require("firebase/auth/cordova");
4444

4545
const auth = getAuth();
4646
getRedirectResult(auth)

snippets/auth-next/cordova/auth_cordova_redirect_result.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 'npm run snippets'.
66

77
// [START auth_cordova_redirect_result_modular]
8-
import { getAuth, getRedirectResult, GoogleAuthProvider } from "firebase/auth";
8+
import { getAuth, getRedirectResult, GoogleAuthProvider } from "firebase/auth/cordova";
99

1010
const auth = getAuth();
1111
getRedirectResult(auth)

snippets/auth-next/cordova/auth_cordova_sign_in_redirect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 'npm run snippets'.
66

77
// [START auth_cordova_sign_in_redirect_modular]
8-
import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "firebase/auth";
8+
import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "firebase/auth/cordova";
99

1010
const auth = getAuth();
1111
signInWithRedirect(auth, new GoogleAuthProvider())

snippets/auth-next/cordova/auth_create_google_provider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 'npm run snippets'.
66

77
// [START auth_create_google_provider_modular]
8-
import { GoogleAuthProvider } from "firebase/auth";
8+
import { GoogleAuthProvider } from "firebase/auth/cordova";
99

1010
const provider = new GoogleAuthProvider();
1111
// [END auth_create_google_provider_modular]

0 commit comments

Comments
 (0)