Skip to content

Fix import path for Cordova snippets #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions auth-next/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

function createGoogleProvider() {
// [START auth_create_google_provider]
const { GoogleAuthProvider } = require("firebase/auth");
const { GoogleAuthProvider } = require("firebase/auth/cordova");

const provider = new GoogleAuthProvider();
// [END auth_create_google_provider]
}

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

const auth = getAuth();
signInWithRedirect(auth, new GoogleAuthProvider())
Expand All @@ -40,7 +40,7 @@ function cordovaSignInRedirect() {

function cordovaRedirectResult() {
// [START auth_cordova_redirect_result]
const { getAuth, getRedirectResult, GoogleAuthProvider } = require("firebase/auth");
const { getAuth, getRedirectResult, GoogleAuthProvider } = require("firebase/auth/cordova");

const auth = getAuth();
getRedirectResult(auth)
Expand Down
2 changes: 1 addition & 1 deletion snippets/auth-next/cordova/auth_cordova_redirect_result.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 'npm run snippets'.

// [START auth_cordova_redirect_result_modular]
import { getAuth, getRedirectResult, GoogleAuthProvider } from "firebase/auth";
import { getAuth, getRedirectResult, GoogleAuthProvider } from "firebase/auth/cordova";

const auth = getAuth();
getRedirectResult(auth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 'npm run snippets'.

// [START auth_cordova_sign_in_redirect_modular]
import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "firebase/auth";
import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "firebase/auth/cordova";

const auth = getAuth();
signInWithRedirect(auth, new GoogleAuthProvider())
Expand Down
2 changes: 1 addition & 1 deletion snippets/auth-next/cordova/auth_create_google_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 'npm run snippets'.

// [START auth_create_google_provider_modular]
import { GoogleAuthProvider } from "firebase/auth";
import { GoogleAuthProvider } from "firebase/auth/cordova";

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