How to change a prompt to an input text and wait the user until send the code in firebase verifyPhoneNumber method?Firebase WEB - Email Verification not being sent. What's wrong with the codeAndroid Firebase: does SMS code have to be sent everytime user signs in?Firebase email verification WITHOUT creating and accountfirebase auth Invalide codepin sended known that i set the right codeFirebase: How to do a phone number authentication after the user has been registered?RN / Firebase: Link a phone credential with an existing accountFirebase PhoneAuthentication not returning verification CodeHow to send a verification code to an email idhow to handle when user selects wrong images for the invisible recaptcha challenge that comes with firebase?Firebase Phone Auth Verification is very slow
Wiring IKEA light fixture into old fixture
How to work a regular job as a former celebrity
Can we have too many dialogue tags and follow up actions?
How can I deal with someone that wants to kill something that isn't supposed to be killed?
Chemistry Riddle
What is a "staved" town, like in "Staverton"?
If hash functions append the length, why does length extension attack work?
Can a creature sustain itself by eating its own severed body parts?
How can I calculate the cost of Skyss bus tickets
High income and difficulty during interviews
Is it ethical to tell my teaching assistant that I like him?
Import data from a current web session?
Do you have to hide in order for other creatures to not know your location inside a fog cloud?
Are rockets faster than airplanes?
Is an easily guessed plot twist a good plot twist?
Inverse Colombian Function
Higher calorie ice cream
What kind of anatomy does a centaur have?
Ultraproduct of Dividing Lines
Can't understand how static works exactly
How could Barty Crouch Jr. have run out of Polyjuice Potion at the end of the Goblet of Fire movie?
Character Arcs - What if the character doesn't overcome the big lie, flaws or wounds?
Found more old paper shares from broken up companies
how to add 1 milliseconds on a datetime string?
How to change a prompt to an input text and wait the user until send the code in firebase verifyPhoneNumber method?
Firebase WEB - Email Verification not being sent. What's wrong with the codeAndroid Firebase: does SMS code have to be sent everytime user signs in?Firebase email verification WITHOUT creating and accountfirebase auth Invalide codepin sended known that i set the right codeFirebase: How to do a phone number authentication after the user has been registered?RN / Firebase: Link a phone credential with an existing accountFirebase PhoneAuthentication not returning verification CodeHow to send a verification code to an email idhow to handle when user selects wrong images for the invisible recaptcha challenge that comes with firebase?Firebase Phone Auth Verification is very slow
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber
Method.
I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code
button.
ngOnInit()
...
firebase.auth().useDeviceLanguage();
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
this.windowRef.recaptchaVerifier.render();
this.provider = new firebase.auth.PhoneAuthProvider();
sendLoginCode()
const appVerifier = this.windowRef.recaptchaVerifier;
const num = this.phoneNumber.e164;
console.log(num);
this.provider.verifyPhoneNumber(num, appVerifier)
.then(verificationId =>
var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
return firebase.auth.PhoneAuthProvider.credential(verificationId,
verificationCode);
)
.then(phoneCredential =>
console.log(phoneCredential);
return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
)
.catch(err => console.log(err) );
I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.
javascript firebase firebase-authentication
add a comment |
I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber
Method.
I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code
button.
ngOnInit()
...
firebase.auth().useDeviceLanguage();
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
this.windowRef.recaptchaVerifier.render();
this.provider = new firebase.auth.PhoneAuthProvider();
sendLoginCode()
const appVerifier = this.windowRef.recaptchaVerifier;
const num = this.phoneNumber.e164;
console.log(num);
this.provider.verifyPhoneNumber(num, appVerifier)
.then(verificationId =>
var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
return firebase.auth.PhoneAuthProvider.credential(verificationId,
verificationCode);
)
.then(phoneCredential =>
console.log(phoneCredential);
return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
)
.catch(err => console.log(err) );
I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.
javascript firebase firebase-authentication
add a comment |
I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber
Method.
I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code
button.
ngOnInit()
...
firebase.auth().useDeviceLanguage();
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
this.windowRef.recaptchaVerifier.render();
this.provider = new firebase.auth.PhoneAuthProvider();
sendLoginCode()
const appVerifier = this.windowRef.recaptchaVerifier;
const num = this.phoneNumber.e164;
console.log(num);
this.provider.verifyPhoneNumber(num, appVerifier)
.then(verificationId =>
var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
return firebase.auth.PhoneAuthProvider.credential(verificationId,
verificationCode);
)
.then(phoneCredential =>
console.log(phoneCredential);
return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
)
.catch(err => console.log(err) );
I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.
javascript firebase firebase-authentication
I am working on an angular project where user can Verify order by enter his phone number and get a Verification Code in his phone and then send it back with Firebase verifyPhoneNumber
Method.
I want to change the code from getting the Verification Code of a prompt to an input shown after the user enter his number and click send the code
button.
ngOnInit()
...
firebase.auth().useDeviceLanguage();
this.windowRef = this.win.windowRef;
this.windowRef.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
this.windowRef.recaptchaVerifier.render();
this.provider = new firebase.auth.PhoneAuthProvider();
sendLoginCode()
const appVerifier = this.windowRef.recaptchaVerifier;
const num = this.phoneNumber.e164;
console.log(num);
this.provider.verifyPhoneNumber(num, appVerifier)
.then(verificationId =>
var verificationCode = window.prompt('Please enter the verification code that was sent to your mobile device.');
return firebase.auth.PhoneAuthProvider.credential(verificationId,
verificationCode);
)
.then(phoneCredential =>
console.log(phoneCredential);
return firebase.auth().currentUser.updatePhoneNumber(phoneCredential);
)
.catch(err => console.log(err) );
I think this function need to be splited and It need to add a function to verify the verification code and execute the rest of the function.
javascript firebase firebase-authentication
javascript firebase firebase-authentication
edited Mar 26 at 14:56
Frank van Puffelen
265k33 gold badges427 silver badges452 bronze badges
265k33 gold badges427 silver badges452 bronze badges
asked Mar 26 at 13:54
Mohamed AyadiMohamed Ayadi
62 bronze badges
62 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358888%2fhow-to-change-a-prompt-to-an-input-text-and-wait-the-user-until-send-the-code-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358888%2fhow-to-change-a-prompt-to-an-input-text-and-wait-the-user-until-send-the-code-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown