From 636c428a052a3833d6d543b6ff4f1fc55f4406c4 Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Wed, 15 Nov 2017 09:35:30 +0000 Subject: [PATCH] Update deprecated firebase method (#3277) getToken is now deprecated, you'll get the following message if using the previous code: firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead. --- examples/with-firebase-authentication/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-firebase-authentication/pages/index.js b/examples/with-firebase-authentication/pages/index.js index fc4975aa..849736da 100644 --- a/examples/with-firebase-authentication/pages/index.js +++ b/examples/with-firebase-authentication/pages/index.js @@ -33,7 +33,7 @@ export default class Index extends Component { firebase.auth().onAuthStateChanged(user => { if (user) { this.setState({ user: user }) - return user.getToken() + return user.getIdToken() .then((token) => { // eslint-disable-next-line no-undef return fetch('/api/login', {