Skip to content

Commit

Permalink
v2.2.4 (#574)
Browse files Browse the repository at this point in the history
* fix(auth): `signInWithEmailAndPassword` is default for email auth unless it is not defined, then `signInAndRetrieveDataWithEmailAndPassword` is used - #467
  • Loading branch information
prescottprue authored Nov 27, 2018
1 parent 8fba666 commit 34b8f08
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 44 deletions.
101 changes: 62 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-redux-firebase",
"version": "2.2.3",
"version": "2.2.4",
"description": "Redux integration for Firebase. Comes with a Higher Order Components for use with React.",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
7 changes: 3 additions & 4 deletions src/utils/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,16 @@ export const getLoginMethodAndParams = (firebase, creds) => {
}
}

// Email/Password Auth
// Check for new sign in method (see #484 for more info)
const emailPasswordAuth = firebase.auth()
.signInAndRetrieveDataWithEmailAndPassword
if (emailPasswordAuth) {
// Note: usage of signInAndRetrieveDataWithEmailAndPassword is now a fallback since it is deprecated (see #484 for more info)
if (!firebase.auth().signInWithEmailAndPassword) {
return {
method: 'signInAndRetrieveDataWithEmailAndPassword',
params: [email, password]
}
}

// Email/Password Auth
return { method: 'signInWithEmailAndPassword', params: [email, password] }
}

Expand Down

0 comments on commit 34b8f08

Please sign in to comment.