STANDARD BUBBLE BEHAVIOR
When a new user signs up it is common practice to send an email to confirm user email. The email sent contains a link (with a token). When the link is clicked user is taken to the page set up in the workflow and Bubble confirms the email address.
Because of the security issues involved, you have no control over this process. And can not manually confirm the user email in any way. You can only retrieve the information from user data type.
THE PROBLEM TO BE SOLVED
The sign up user experience is very important if you do not want to loose your new user right after he/she decided to join your app. This means that you should avoid as much as possible any interruption in the navigation flow. And a click on an email that takes the user to a new page is something that sometimes you do not want to happen.
This was the case while building my application. When users sign up, they have to go through 3 registration steps: personal info (name, surname, etc.), business info (company name, vat number, etc.) and data validation (mobile verification as well as email verification). The 3rd and last step it is crucial, and I wanted to provide a smooth experience to the new users in order to have them complete the sign up without any distraction.
THE SOLUTION I WANT TO SHARE
This is the solution I implemented for my app and that I want to share with the community.
-
in the USER data type create a text field called EMAIL CODE and a boolean filed (yes/no) called EMAIL VERIFIED. Set email verified default to NO.
-
in the front end, design a box that shows the user email with a button (or a link) that says “click here to validate your email”
- when the text underlined (click here to get your email verification code) is clicked, create a workflow (I have used some status for better management of the various conditions) with the following actions :
3.1) calculate a random string and save it in the user field EMAIL CODE
3.2) send and email to the user with the EMAIL CODE printed in the body
3.3) in the front end change the text in the box to “input here your email code” and the link text to “click here confirm the email verification code”
3.4) the user receives the email and type the code in the box without leaving the page
- when user click the text under the code in order to complete the verification, a new workflow starts (if the input code is the same as the random string saved before)
4.1) the only action required is the update of the EMAIL VERIFIED field to YES.
- the front end will show that the email has beed verified and the user can go on and complete the sign up
NOTE: remember that every time you need to check if the user email has been verified, you need to control both the EMAIL VERIFIED custom field as well as the default “user’s email confirmed”. This is necessary in my case since I decided to manage this custom process but still to send a confirmation email upon sign up.
That’s all. A little tip that I hope can be useful to some of you.
Regards
Stefano