Skip to content

Commit 34b8f08

Browse files
authored
v2.2.4 (#574)
* fix(auth): `signInWithEmailAndPassword` is default for email auth unless it is not defined, then `signInAndRetrieveDataWithEmailAndPassword` is used - #467
1 parent 8fba666 commit 34b8f08

File tree

3 files changed

+66
-44
lines changed

3 files changed

+66
-44
lines changed

package-lock.json

Lines changed: 62 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-firebase",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"description": "Redux integration for Firebase. Comes with a Higher Order Components for use with React.",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/utils/auth.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,16 @@ export const getLoginMethodAndParams = (firebase, creds) => {
142142
}
143143
}
144144

145-
// Email/Password Auth
146145
// Check for new sign in method (see #484 for more info)
147-
const emailPasswordAuth = firebase.auth()
148-
.signInAndRetrieveDataWithEmailAndPassword
149-
if (emailPasswordAuth) {
146+
// Note: usage of signInAndRetrieveDataWithEmailAndPassword is now a fallback since it is deprecated (see #484 for more info)
147+
if (!firebase.auth().signInWithEmailAndPassword) {
150148
return {
151149
method: 'signInAndRetrieveDataWithEmailAndPassword',
152150
params: [email, password]
153151
}
154152
}
155153

154+
// Email/Password Auth
156155
return { method: 'signInWithEmailAndPassword', params: [email, password] }
157156
}
158157

0 commit comments

Comments
 (0)