IO-1274 Change Password on profilel

This commit is contained in:
Patrick Fic
2021-07-26 16:54:31 -07:00
parent 6b811d635b
commit 8ca3741a52
7 changed files with 193 additions and 20 deletions

View File

@@ -35,6 +35,24 @@ export const updateCurrentUser = (userDetails) => {
});
};
export const updateCurrentPassword = async (password) => {
const currentUser = await getCurrentUser();
return currentUser.updatePassword(password);
// return new Promise((resolve, reject) => {
// const unsubscribe = auth.onAuthStateChanged(
// (userAuth) => {
// userAuth.updatePassword(password).then((r) => {
// unsubscribe();
// resolve(userAuth);
// });
// },
// (error) => reject(error)
// );
// });
};
let messaging;
try {
messaging = firebase.messaging();