-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Domains: Don't allow unverified email for domain registration and G Suite #16166
Domains: Don't allow unverified email for domain registration and G Suite #16166
Conversation
The WPCOM email is used by default for domain registration and G Suite purchases and it's important that it's a valid email. User might have made a typo in their email during registration and we should wait for them to verify the email before allowing further purchases.
Comonents in an array need to have unique keys
return ( | ||
<Main className="domain-management-add-google-apps"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is not defined anywhere and seems to be useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good and works as expected (within the documented limitations) for me. I have nothing to nitpick. Nice job! 👍
It's a great idea. In this case, we're (and should be) allowing domain/email purchases as part of NUX, right? For any new user signing up, they can purchase anything they want along with account creation. We're going to check if WPCOM email is verified if they make any subsequent domain/email purchases. I'm not too sure how often we come across this scenario though, but no matter how rare or often, it's good to check. It won't affect multiple domain purchases (new user) via
Yep, though a small nitpick. We're only showing them |
Yup, that's the only case - signup/NUX and
Good point, though, I'm re-using an existing component and don't want to modify it too much. FWIW, we do show the email when we re-send the verification email, so that should help the user (though, of course, some typos are hard to catch): I'm now thinking that a better option would be to re-use the notice that @mikeshelton1503 introduced in #15880 🤔 Mike, what do you think? On one hand, the component I'm using now is used in other parts of Calypso. So if we were to re-use the new designs, we should do that Calypso-wide, integrating the new designs into the existing component. |
The gif looks a lot better! I know I called it a small nitpick, but I also knew the implementation is going to be far from small! 😆 Good with this design too as the email is visible. |
Hattip for the idea to @iamgabrielma in
p8Eqe3-aF-p2
.Just to be clear: in this patch, we're only interested in the WPCOM's email verification, not the ICANN one.
The WPCOM email is used by default for domain registration and G Suite purchases and it's important that it's a valid email. User might have made a typo in their email during registration and we should wait for them to verify the email before allowing further purchases that uses that email.
Domain mapping, site redirect and plans don't require email for verification, etc. so I did not restrict purchasing them.
I've started with a custom component, but then discovered we already have a very nice one used by different parts of our code, so I've used it to keep it consistent. It's also pretty cool and depends on Redux state - so as soon as you verify your email, it will disappear and re-activate the component it's "gating".
Testing
Email Forwarding
option at the bottom is still accessible:Check that the user can buy domain mapping, site redirect and plans regardless of the email's status.
Make sure that all of the above do not impact NUX and signup.
For easier testing, you could just modify the
isCurrentUserEmailVerified
selector to always returntrue
.Or, you know, just create a new user ;)
Known issues and limitations
/me
. The component I re-used does not check it either, so I stuck with it as-is for consistency's sake with the rest of the app. But if turns out that the email updates, not the first verification, is what causes the majority of the issues, we can revisit this.Already own a domain?
part there (which is an integral part of the component and can't be easily excluded), so the user can't map a domain from there. They can still visitSettings
and click the small link tomap
their domain there - of visitdomains/add/mapping/
;Pcc @ehti for sanity check from Domain Guild perspective 🙇