mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
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.
This commit is contained in:
parent
c0581a40cc
commit
636c428a05
|
@ -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', {
|
||||
|
|
Loading…
Reference in a new issue