@edgedev/firebase 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/edgeFirebase.ts +25 -1
- package/package.json +1 -1
- package/src/postinstall.sh +1 -1
package/edgeFirebase.ts
CHANGED
|
@@ -41,6 +41,8 @@ import {
|
|
|
41
41
|
EmailAuthProvider,
|
|
42
42
|
sendPasswordResetEmail,
|
|
43
43
|
confirmPasswordReset,
|
|
44
|
+
checkActionCode,
|
|
45
|
+
applyActionCode,
|
|
44
46
|
connectAuthEmulator,
|
|
45
47
|
deleteUser,
|
|
46
48
|
OAuthProvider,
|
|
@@ -49,6 +51,7 @@ import {
|
|
|
49
51
|
signInWithPhoneNumber,
|
|
50
52
|
sendSignInLinkToEmail,
|
|
51
53
|
updateEmail,
|
|
54
|
+
verifyBeforeUpdateEmail,
|
|
52
55
|
RecaptchaVerifier,
|
|
53
56
|
ConfirmationResult,
|
|
54
57
|
PhoneAuthProvider,
|
|
@@ -260,7 +263,7 @@ export const EdgeFirebase = class {
|
|
|
260
263
|
|
|
261
264
|
public updateEmail = async (newEmail: string): Promise<actionResponse> => {
|
|
262
265
|
try {
|
|
263
|
-
await
|
|
266
|
+
await verifyBeforeUpdateEmail(this.auth.currentUser, newEmail);
|
|
264
267
|
return {
|
|
265
268
|
success: true,
|
|
266
269
|
message: "Email updated",
|
|
@@ -783,6 +786,27 @@ export const EdgeFirebase = class {
|
|
|
783
786
|
}
|
|
784
787
|
};
|
|
785
788
|
|
|
789
|
+
public emailUpdate = async (
|
|
790
|
+
oobCode: string
|
|
791
|
+
): Promise<actionResponse> => {
|
|
792
|
+
|
|
793
|
+
try {
|
|
794
|
+
const info = await checkActionCode(this.auth, oobCode);
|
|
795
|
+
await applyActionCode(this.auth, oobCode);
|
|
796
|
+
return this.sendResponse({
|
|
797
|
+
success: true,
|
|
798
|
+
message: "line 798",
|
|
799
|
+
meta: {}
|
|
800
|
+
});
|
|
801
|
+
} catch (error) {
|
|
802
|
+
return this.sendResponse({
|
|
803
|
+
success: false,
|
|
804
|
+
message: error.message,
|
|
805
|
+
meta: {}
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
|
|
786
810
|
public passwordReset = async (
|
|
787
811
|
password: string,
|
|
788
812
|
oobCode: string
|
package/package.json
CHANGED
package/src/postinstall.sh
CHANGED
|
@@ -46,7 +46,7 @@ if [ ! -f "$project_root/.env.development" ]; then
|
|
|
46
46
|
fi
|
|
47
47
|
|
|
48
48
|
if [ ! -f "$project_root/.env.production" ]; then
|
|
49
|
-
cp ./src/.env.prod "$project_root
|
|
49
|
+
cp ./src/.env.prod "$project_root/.env.production"
|
|
50
50
|
fi
|
|
51
51
|
|
|
52
52
|
if [ ! -f "$project_root/functions/package.json" ]; then
|