Skip to content

Automatically send verification email upon account creation #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
winston-brown opened this issue Nov 4, 2016 · 4 comments
Closed

Automatically send verification email upon account creation #387

winston-brown opened this issue Nov 4, 2016 · 4 comments

Comments

@winston-brown
Copy link

Hi!
I'm new to GitHub, but would really love to contribute my two cents.
I want to add a new boolean parameter to FlowParameters.java called sendVerificationEmail which could be implemented in the registerUser method of RegisterEmailActivity.java . My plan is to add

//Send verification email
if (mActivityHelper.getFlowParams().sendVerificationEmail) { firebaseUser.sendEmailVerification(); }

in .addOnSuccessListener .

Then I could just code

startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setIsSmartLockEnabled(true)
.sendVerificationEmail(true)
.setProviders(AuthUI.EMAIL_PROVIDER)
.build(),
RC_SIGN_IN);

in my activity.
I've found that it is really clunky to try to catch a result showing that the user created a new account, because I am only using the AuthUI.EMAIL_PROVIDER.

Also, what do you think would be the best way to notify the user to check their email account and verify? I thought about changing

<string name="progress_dialog_signing_up">Signing up…</string>
to
<string name="progress_dialog_signing_up">Sending verification email to</string>
and change line 255
mActivityHelper.showLoadingDialog(R.string.progress_dialog_signing_up);
to
mActivityHelper.showLoadingDialog(getResources().getString(R.string.progress_dialog_signing_up) + " " + email);

Thank You,
Winston

@samtstern
Copy link
Contributor

Thanks for the idea(s) @forneverafter .

I think what you're saying is a totally valid feature request, but I think it exposes a larger need. In general, I think FirebaseUI could do a better job returning more information to the app at the end of the flow (did the user sign up? Was it a new account? What provider was used? etc). Rather than add boolean parameters for each option a developer might want, if we return more information at the end of the flow you could then do things like send verification email yourself.

Would getting more information about new vs existing account as a result of the sign-in flow solve your use case?

@winston-brown
Copy link
Author

Your right! I think it makes way more sense to pass this back as a key/value in an Intent to onActivityResult. That will work perfect for me, but I do think sending a verification email is par for the course in email authentication. Thanks and I can help in whatever way necessary.

@SUPERCILEX
Copy link
Collaborator

SUPERCILEX commented Nov 5, 2016

I think this could be part of v2:

@samtstern
Copy link
Contributor

Marking this as a duplication of #312 that's the earliest issue to track email verification requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants