diff --git a/auth-next/custom.js b/auth-next/custom.js index 6ecdbe18..8f4ac547 100644 --- a/auth-next/custom.js +++ b/auth-next/custom.js @@ -17,8 +17,9 @@ function signInCustom() { const auth = getAuth(firebaseApp); signInWithCustomToken(auth, token) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => { diff --git a/auth-next/email.js b/auth-next/email.js index 07a3cc3a..7285185a 100644 --- a/auth-next/email.js +++ b/auth-next/email.js @@ -18,8 +18,9 @@ function signInWithEmailPassword() { const auth = getAuth(firebaseApp); signInWithEmailAndPassword(auth, email, password) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => { @@ -38,8 +39,9 @@ function signUpWithEmailPassword() { const auth = getAuth(firebaseApp); createUserWithEmailAndPassword(auth, email, password) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => { diff --git a/auth/custom.js b/auth/custom.js index dc02990e..97713714 100644 --- a/auth/custom.js +++ b/auth/custom.js @@ -8,8 +8,9 @@ function signInCustom() { var token = "token123"; // [START auth_sign_in_custom] firebase.auth().signInWithCustomToken(token) - .then((user) => { + .then((userCredential) => { // Signed in + var user = userCredential.user; // ... }) .catch((error) => { diff --git a/auth/email.js b/auth/email.js index ba919819..cdb4bde3 100644 --- a/auth/email.js +++ b/auth/email.js @@ -9,8 +9,9 @@ function signInWithEmailPassword() { var password = "hunter2"; // [START auth_signin_password] firebase.auth().signInWithEmailAndPassword(email, password) - .then((user) => { - // Signed in + .then((userCredential) => { + // Signed in + var user = userCredential.user; // ... }) .catch((error) => { @@ -25,8 +26,9 @@ function signUpWithEmailPasswoerd() { var password = "hunter2"; // [START auth_signup_password] firebase.auth().createUserWithEmailAndPassword(email, password) - .then((user) => { + .then((userCredential) => { // Signed in + var user = userCredential.user; // ... }) .catch((error) => { diff --git a/snippets/auth-next/custom/auth_sign_in_custom.js b/snippets/auth-next/custom/auth_sign_in_custom.js index c22ed725..018c8b07 100644 --- a/snippets/auth-next/custom/auth_sign_in_custom.js +++ b/snippets/auth-next/custom/auth_sign_in_custom.js @@ -8,8 +8,9 @@ import { getAuth, signInWithCustomToken } from "firebase/auth"; const auth = getAuth(firebaseApp); signInWithCustomToken(auth, token) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => { diff --git a/snippets/auth-next/email/auth_signin_password.js b/snippets/auth-next/email/auth_signin_password.js index d04a492e..43817787 100644 --- a/snippets/auth-next/email/auth_signin_password.js +++ b/snippets/auth-next/email/auth_signin_password.js @@ -8,8 +8,9 @@ import { getAuth, signInWithEmailAndPassword } from "firebase/auth"; const auth = getAuth(firebaseApp); signInWithEmailAndPassword(auth, email, password) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => { diff --git a/snippets/auth-next/email/auth_signup_password.js b/snippets/auth-next/email/auth_signup_password.js index de1e38bb..3a20884c 100644 --- a/snippets/auth-next/email/auth_signup_password.js +++ b/snippets/auth-next/email/auth_signup_password.js @@ -8,8 +8,9 @@ import { getAuth, createUserWithEmailAndPassword } from "firebase/auth"; const auth = getAuth(firebaseApp); createUserWithEmailAndPassword(auth, email, password) - .then((user) => { + .then((userCredential) => { // Signed in + const user = userCredential.user; // ... }) .catch((error) => {