Email Verification Code Login
If the current user supports password login, you can bind an email address for the user. After binding, the user can log in using "Email + Password":
Precondition
Enable Email Login
- Go to CloudBase Console/Authentication/Login Methods
- In the login methods list, select "Email Verification Code Login" and click "Configure Sender Settings".
- After configuring the sender's SMTP settings, enable email login.

Common Email SMTP Settings
| SMTP Host | SMTP Port | SMTP Security Mode | |
|---|---|---|---|
| qq Mail | smtp.qq.com | 465/587 | SSL(465)/STARTTLS(587) |
| Tencent Enterprise Email | smtp.exmail.qq.com | 465 | SSL |
| 163 Mail | smtp.163.com | 465 | SSL |
| gmail | smtp.gmail.com | 465/578 | SSL(465)/STARTSSL(587) |
Register User
For the user registration process, see User Registration.
Email Verification Code Login
Auth.signInWithEmail method is used for email verification code login.
const email = 'xxx'
// Send the verification code
const verificationInfo = await auth.getVerification({
email: email,
});
// Assume the verification code "000000" entered by the user is received here.
const verificationCode = "000000";
// Verification code login
await auth.signInWithEmail({
verificationInfo,
verificationCode: verificationCode,
email: email,
});
Common Email Servers
QQ Mail
Step 1: Log in to QQ Mail
Go to QQ Mail homepage and log in to your QQ Mail.
Step 2: Enable the IMAP/SMTP service
After logging in to your email, go to "Settings - Account":

Then, locate the "Enable Services" setting under "Account" settings and enable the IMAP/SMTP service:

After enabling successfully, save your email login authorization code:

You can also enable the POP3/SMTP service. The authorization codes for both services can be used as the SMTP account password in Step 3.
Step 3: Configure QQ Mail as the sender
Use QQ Mail as the sender address and SMTP account username, and use the authorization code from Step 2 as the SMTP account password.

gmail Mail
Step 1: Log in to gmail Mail
gamil Mail has the IMAP/SMTP service enabled by default. This step verifies whether the email is available.
Step 2: Enable google account two-step verification
https://myaccount.google.com/security?utm_source=OGB&utm_medium=app
Click Security --> 2-Step Verification to enable it.
Step 3: Enable the google account app password
https://support.google.com/accounts/answer/185833?hl=zh-Hans
Step 4: Configure the Cloud Development Platform email login SMTP
| SMTP Server Host | |
|---|---|
| Sender | your gmail email |
| SMTP Server Host | smtp.gmail.com |
| Port | 465 |
| SMTP Account Username | your gmail email |
| SMTP Account Password | the app password from Step 3 |
| SMTP Security Mode | SSL |