diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.html b/ng-seed/src/app/end-user/customer-info/customer-info.component.html
index 5f11f7e..bf8c6c8 100644
--- a/ng-seed/src/app/end-user/customer-info/customer-info.component.html
+++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.html
@@ -54,7 +54,7 @@
-
+
diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
index f19906c..bb93c65 100644
--- a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
+++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
@@ -96,14 +96,49 @@ export class CustomerInfoComponent implements OnInit {
}
resendOTP() {
- this.timeLeft = 10;
- this.interval = setInterval(() => {
- if(this.timeLeft > 0) {
- this.timeLeft--;
- } else {
- clearInterval(this.interval);
+ this.phoneNumber = this.form.value.phoneNo
+ if( this.phoneNumber.length!=10){
+alert("invalid Phone No...!")
+ }else{
+ this.otpData = event
+ this.timeLeft = 60;
+ this.interval = setInterval(() => {
+ if(this.timeLeft > 0) {
+ this.timeLeft--;
+ } else {
+ clearInterval(this.interval);
+ }
+ },1000)
+
+ this.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier(
+ 'sign-in-button',
+ {
+ size: 'invisible',
}
- },1000)
+ );
+ console.log(this.reCaptchaVerifier);
+ this.phoneNumber = "+91"+this.phoneNumber;
+ console.log(this.phoneNumber);
+ firebase
+ .auth()
+ .signInWithPhoneNumber(this.phoneNumber, this.reCaptchaVerifier)
+ .then((confirmationResult) => {
+ localStorage.setItem(
+ 'verificationId',
+ JSON.stringify(confirmationResult.verificationId)
+ );
+ this.ngZone.run(() => {
+ //this.router.navigate(['/code']);
+ });
+ })
+ .catch((error) => {
+ console.log(error.message);
+ alert(error.message);
+ setTimeout(() => {
+ window.location.reload();
+ }, 5000);
+ });
+ }
}
verify(event){
diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts
index 71d1832..cd08ea6 100644
--- a/ng-seed/src/environments/environment.ts
+++ b/ng-seed/src/environments/environment.ts
@@ -11,12 +11,13 @@ apiEndpoint:'https://api.venbait.in/api/',
// apiEndpoint:'http://192.168.1.20:8080/api/',
firebase: {
- apiKey: 'AIzaSyBAJICL9s0BadjIYE0f6OCuKjJKCFRLInc',
- authDomain: 'phone-auth-9c3e3.firebaseapp.com',
- projectId: 'phone-auth-9c3e3',
- storageBucket: 'phone-auth-9c3e3.appspot.com',
- messagingSenderId: '255150664883',
- appId: '1:255150664883:web:ef8f193e6a3262ab92d4c6',
+ apiKey: "AIzaSyBVPQ6C7cg5l8I-o7WSmmXdioMa4C0ZKNM",
+ authDomain: "phone-otp-5d22e.firebaseapp.com",
+ projectId: "phone-otp-5d22e",
+ storageBucket: "phone-otp-5d22e.appspot.com",
+ messagingSenderId: "207025211598",
+ appId: "1:207025211598:web:f2e4ebfb2e4ca5d5d8a89f",
+ measurementId: "G-LJFTVZSP38"
},
};