From a5f9e278d7d3d43093846f22f0bee1e1893dbaff Mon Sep 17 00:00:00 2001 From: "Sat Mandir S. Khalsa" Date: Tue, 21 Mar 2017 12:07:27 -0700 Subject: [PATCH 1/2] Fix documentation for Auth methods --- docs/api/authentication.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/api/authentication.md b/docs/api/authentication.md index 54e9763e..d8bb806d 100644 --- a/docs/api/authentication.md +++ b/docs/api/authentication.md @@ -100,7 +100,7 @@ Sign in the user with a 3rd party credential provider. `credential` requires the ```javascript const credential = { - provider: 'facebook.com', + provider: 'facebook', token: '12345', secret: '6789', }; @@ -210,7 +210,7 @@ Reauthenticate the current user with credentials: ```javascript const credentials = { - provider: 'facebook.com', + provider: 'facebook', token: '12345', secret: '6789', }; @@ -248,7 +248,8 @@ firebase.auth().currentUser Updates the user's email address. See Firebase docs for more information on security & email validation. This will Promise reject is the user is anonymous. ```javascript -firebase.auth().updateUserEmail('foo@bar.com') +firebase.auth().currentUser + .updateUserEmail('foo@bar.com') .then() .catch(); ``` @@ -258,7 +259,8 @@ firebase.auth().updateUserEmail('foo@bar.com') Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call firebase.User#reauthenticate. This will Promise reject is the user is anonymous. ```javascript -firebase.auth().updatePassword('foobar1234') +firebase.auth().currentUser + .updatePassword('foobar1234') .then() .catch(); ``` @@ -275,7 +277,7 @@ Updates a user's profile data. Profile data should be an object of fields to upd ``` ```javascript -firebase.auth() +firebase.auth().currentUser .updateProfile({ displayName: 'Ari Lerner' }) From 657b9e4e9128b2c20a9fbd0bcd4d513353c23ad3 Mon Sep 17 00:00:00 2001 From: "Sat Mandir S. Khalsa" Date: Tue, 21 Mar 2017 15:30:34 -0700 Subject: [PATCH 2/2] Fix updateEmail method --- docs/api/authentication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/authentication.md b/docs/api/authentication.md index d8bb806d..8d0d9ad0 100644 --- a/docs/api/authentication.md +++ b/docs/api/authentication.md @@ -249,7 +249,7 @@ Updates the user's email address. See Firebase docs for more information on secu ```javascript firebase.auth().currentUser - .updateUserEmail('foo@bar.com') + .updateEmail('foo@bar.com') .then() .catch(); ```