Using firebase email verification for a custom email
I am using ionic 3 and firebase authentication using facebook. The facebook does not return email id if user did not provided one while signup or did not verify it at all.
Our system mandates providing of email id. So, as a fall back we prompt user to provide the email id. As we let user manually provide the email id at this step so there is a need to verify it.
It seems firebase auth sendEmailVerifcation required the email id already in the auth. As our case is specifically handling when this is missing so how can we use this feature to validate the email id?
Any other ideas are welcome too to handle it. It is a critical blocker for us as people are misusing our reward system by providing fake email ids.
I have looked into the sendEmailVerification api but it does not seem to accept any parameter to manually pass the email id.
constructor(public navCtrl: NavController,
public navParams: NavParams,
private afAuth: AngularFireAuth,
private fb: Facebook,
private platform: Platform,
private core:CoreProvider,
public viewCtrl: ViewController,
private ddlSvc: DoodleDataProvider,
private alertCtrl:AlertController,
private toastCtrl: ToastController) {
//block back button on android
platform.registerBackButtonAction(() => {
},1);
afAuth.authState.subscribe(user => {
console.log("auth subscription finished: with user:" + JSON.stringify(user))
//go back if user could not be retireved or manual logout is set to true
if (!user || core.manualLogout == true) {
return;
}
user.sendEmailVerfication() //problem here when email is null
console.log("initializing user")
this.createUser(user.uid)
});
}
firebase firebase-authentication email-verification
add a comment |
I am using ionic 3 and firebase authentication using facebook. The facebook does not return email id if user did not provided one while signup or did not verify it at all.
Our system mandates providing of email id. So, as a fall back we prompt user to provide the email id. As we let user manually provide the email id at this step so there is a need to verify it.
It seems firebase auth sendEmailVerifcation required the email id already in the auth. As our case is specifically handling when this is missing so how can we use this feature to validate the email id?
Any other ideas are welcome too to handle it. It is a critical blocker for us as people are misusing our reward system by providing fake email ids.
I have looked into the sendEmailVerification api but it does not seem to accept any parameter to manually pass the email id.
constructor(public navCtrl: NavController,
public navParams: NavParams,
private afAuth: AngularFireAuth,
private fb: Facebook,
private platform: Platform,
private core:CoreProvider,
public viewCtrl: ViewController,
private ddlSvc: DoodleDataProvider,
private alertCtrl:AlertController,
private toastCtrl: ToastController) {
//block back button on android
platform.registerBackButtonAction(() => {
},1);
afAuth.authState.subscribe(user => {
console.log("auth subscription finished: with user:" + JSON.stringify(user))
//go back if user could not be retireved or manual logout is set to true
if (!user || core.manualLogout == true) {
return;
}
user.sendEmailVerfication() //problem here when email is null
console.log("initializing user")
this.createUser(user.uid)
});
}
firebase firebase-authentication email-verification
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can usesendEmailVerfication
to send the verification message.
– Frank van Puffelen
Jan 1 at 22:09
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59
add a comment |
I am using ionic 3 and firebase authentication using facebook. The facebook does not return email id if user did not provided one while signup or did not verify it at all.
Our system mandates providing of email id. So, as a fall back we prompt user to provide the email id. As we let user manually provide the email id at this step so there is a need to verify it.
It seems firebase auth sendEmailVerifcation required the email id already in the auth. As our case is specifically handling when this is missing so how can we use this feature to validate the email id?
Any other ideas are welcome too to handle it. It is a critical blocker for us as people are misusing our reward system by providing fake email ids.
I have looked into the sendEmailVerification api but it does not seem to accept any parameter to manually pass the email id.
constructor(public navCtrl: NavController,
public navParams: NavParams,
private afAuth: AngularFireAuth,
private fb: Facebook,
private platform: Platform,
private core:CoreProvider,
public viewCtrl: ViewController,
private ddlSvc: DoodleDataProvider,
private alertCtrl:AlertController,
private toastCtrl: ToastController) {
//block back button on android
platform.registerBackButtonAction(() => {
},1);
afAuth.authState.subscribe(user => {
console.log("auth subscription finished: with user:" + JSON.stringify(user))
//go back if user could not be retireved or manual logout is set to true
if (!user || core.manualLogout == true) {
return;
}
user.sendEmailVerfication() //problem here when email is null
console.log("initializing user")
this.createUser(user.uid)
});
}
firebase firebase-authentication email-verification
I am using ionic 3 and firebase authentication using facebook. The facebook does not return email id if user did not provided one while signup or did not verify it at all.
Our system mandates providing of email id. So, as a fall back we prompt user to provide the email id. As we let user manually provide the email id at this step so there is a need to verify it.
It seems firebase auth sendEmailVerifcation required the email id already in the auth. As our case is specifically handling when this is missing so how can we use this feature to validate the email id?
Any other ideas are welcome too to handle it. It is a critical blocker for us as people are misusing our reward system by providing fake email ids.
I have looked into the sendEmailVerification api but it does not seem to accept any parameter to manually pass the email id.
constructor(public navCtrl: NavController,
public navParams: NavParams,
private afAuth: AngularFireAuth,
private fb: Facebook,
private platform: Platform,
private core:CoreProvider,
public viewCtrl: ViewController,
private ddlSvc: DoodleDataProvider,
private alertCtrl:AlertController,
private toastCtrl: ToastController) {
//block back button on android
platform.registerBackButtonAction(() => {
},1);
afAuth.authState.subscribe(user => {
console.log("auth subscription finished: with user:" + JSON.stringify(user))
//go back if user could not be retireved or manual logout is set to true
if (!user || core.manualLogout == true) {
return;
}
user.sendEmailVerfication() //problem here when email is null
console.log("initializing user")
this.createUser(user.uid)
});
}
firebase firebase-authentication email-verification
firebase firebase-authentication email-verification
asked Jan 1 at 21:42


Moblize ITMoblize IT
197
197
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can usesendEmailVerfication
to send the verification message.
– Frank van Puffelen
Jan 1 at 22:09
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59
add a comment |
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can usesendEmailVerfication
to send the verification message.
– Frank van Puffelen
Jan 1 at 22:09
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can use
sendEmailVerfication
to send the verification message.– Frank van Puffelen
Jan 1 at 22:09
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can use
sendEmailVerfication
to send the verification message.– Frank van Puffelen
Jan 1 at 22:09
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59
add a comment |
1 Answer
1
active
oldest
votes
Email verification is only for users who sign up with email/password authentication. The purpose is to validate that the user gave a valid email address at the time they signed up. You typically want to use email verification after you sign in the user with firebase.auth().createUserWithEmailAndPassword()
.
Email verification is not available for other authentication providers (such as Facebook), since they have their own way to managing their users' email addresses.
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
add a comment |
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%2f53999172%2fusing-firebase-email-verification-for-a-custom-email%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Email verification is only for users who sign up with email/password authentication. The purpose is to validate that the user gave a valid email address at the time they signed up. You typically want to use email verification after you sign in the user with firebase.auth().createUserWithEmailAndPassword()
.
Email verification is not available for other authentication providers (such as Facebook), since they have their own way to managing their users' email addresses.
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
add a comment |
Email verification is only for users who sign up with email/password authentication. The purpose is to validate that the user gave a valid email address at the time they signed up. You typically want to use email verification after you sign in the user with firebase.auth().createUserWithEmailAndPassword()
.
Email verification is not available for other authentication providers (such as Facebook), since they have their own way to managing their users' email addresses.
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
add a comment |
Email verification is only for users who sign up with email/password authentication. The purpose is to validate that the user gave a valid email address at the time they signed up. You typically want to use email verification after you sign in the user with firebase.auth().createUserWithEmailAndPassword()
.
Email verification is not available for other authentication providers (such as Facebook), since they have their own way to managing their users' email addresses.
Email verification is only for users who sign up with email/password authentication. The purpose is to validate that the user gave a valid email address at the time they signed up. You typically want to use email verification after you sign in the user with firebase.auth().createUserWithEmailAndPassword()
.
Email verification is not available for other authentication providers (such as Facebook), since they have their own way to managing their users' email addresses.
answered Jan 1 at 22:01


Doug StevensonDoug Stevenson
80.4k996114
80.4k996114
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
add a comment |
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
can i workaround some on with a default password and user provided email? basically my need to verify is only when fb does not return me an email. So in those cases i need a way to send verification email. But then for all the users the login experience need to be the same that is using facebook sign.
– Moblize IT
Jan 2 at 0:01
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
No. As I said, email verification is only for email/password auth.
– Doug Stevenson
Jan 2 at 0:04
add a comment |
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%2f53999172%2fusing-firebase-email-verification-for-a-custom-email%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
How about also creating an email+password account for them, and then linking the email+password and the Facebook accounts? After doing that, you can use
sendEmailVerfication
to send the verification message.– Frank van Puffelen
Jan 1 at 22:09
Well our client app which is ionic 3 based is a bakery app and we wanted to keep things simplest in terms of user login and accounts. so we loved the idea of using one click login with facebook. Now replacing it with a requirement to ask email plus password is something customer wont be happy. is there a work around way like creating account with email and password using provided email plus default password in the background and then send verification link? basically we need to verify emails only when fb does not give it to us. and we want to keep user experience the same.
– Moblize IT
Jan 1 at 23:47
You could generate a random password. I would not use a default password, since that would mean anyone who knows the password can log into each account.
– Frank van Puffelen
Jan 2 at 1:54
well i understand the risk of a default password. but my intention is to use this email + pwd mechanism just to be able to use sendEmailVerification link in certain situations. I always want to force users to login using facebook. Do you think that can work?
– Moblize IT
Jan 2 at 1:59