Skip to content

Commit 8b7c216

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): auth-web-cloudbase Skill 邮箱注册 API 流程说明不清晰 (issue_mnouau2z_bk9am7)
1 parent b377b63 commit 8b7c216

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

config/source/skills/auth-web/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Use the same CDN address as `web-development`. Prefer npm installation in modern
7777
- `auth.signInWithOtp({ email })` and `auth.signUp({ email })` use `email`
7878
- `auth.signUp({ username, password })` and `auth.signInWithPassword({ username, password })` are the canonical username/password Web auth path
7979
- Email and phone registration are OTP flows: call `auth.signUp({ email|phone, ... })`, then complete the signup with the returned `data.verifyOtp({ token })`
80+
- For email signup, the canonical sequence is: `auth.signUp({ email, ... })` to send the code, persist the returned `data` signup handle, then call `signupHandle.verifyOtp({ token })` with only the verification code
8081
- Do not describe email registration as `auth.signUp({ email, password })`; for email-based password login, use `auth.signInWithPassword({ email, password })` after the account already exists
8182
- If the task gives accounts like `admin`, `editor`, or another plain string without `@`, treat it as a username-style identifier rather than an email address
8283
- `verifyOtp({ token })` expects the SMS or email code in `token`
@@ -151,6 +152,7 @@ const phoneLogin = await auth.signInWithPassword({
151152
- When the task uses plain usernames such as `admin`, `editor`, or `user01`, the canonical form code is `auth.signUp({ username, password })`
152153
- Email and phone signup are always two-step OTP flows: first call `auth.signUp({ email|phone, ... })` to send the code, then keep the returned `data` object and call `data.verifyOtp({ token })` to finish registration
153154
- The `verifyOtp` callback returned from `auth.signUp({ email|phone, ... })` already carries the signup context. In the second step, send only the verification code as `verifyOtp({ token })`; do not rebuild the signup payload
155+
- In split UI handlers, `auth.signUp({ email, ... })` is the "send code" step and `signupHandle.verifyOtp({ token })` is the "complete registration" step
154156
- Do not write email registration as `auth.signUp({ email, password })`; email/password is a sign-in flow for an existing account, not the signup payload shown here
155157
- If the UI splits "send code" and "complete registration" into different handlers, persist the returned sign-up handle from step 1 and reuse it in step 2
156158

@@ -168,7 +170,7 @@ const emailSignUp = await auth.signUp({
168170
email: "new@example.com",
169171
nickname: "User",
170172
});
171-
const emailSignupHandle = emailSignUp.data;
173+
const emailSignupHandle = emailSignUp.data; // Required for the follow-up verify step.
172174
const emailVerifyResult = await emailSignupHandle.verifyOtp({
173175
token: "123456",
174176
});

0 commit comments

Comments
 (0)