Skip to content

Commit 0e99181

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

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ const phoneLogin = await auth.signInWithPassword({ phone: '13800138000', passwor
131131
- Do not switch to email OTP or phone OTP unless the task explicitly says the account identifier is an email address or phone number
132132
- When the task uses plain usernames such as `admin`, `editor`, or `user01`, the canonical form code is `auth.signUp({ username, password })`
133133
- Email and phone signup are verification-code flows. Send the code with `auth.signUp(...)`, then call the returned `verifyOtp({ token })` to finish registration
134+
- The `verifyOtp` callback returned from `auth.signUp({ email|phone, ... })` already carries the signup context. For the follow-up step, send only the verification code as `verifyOtp({ token })`
134135
- Do not write email registration as `auth.signUp({ email, password })`; email/password is a sign-in flow, not the signup payload shown here
135136
```js
136137
// Username + Password
@@ -194,11 +195,7 @@ const handleRegister = async () => {
194195
try {
195196
if (!signUpData?.verifyOtp) throw new Error('Please send the code first')
196197

197-
const { error } = await signUpData.verifyOtp({
198-
email,
199-
token: code,
200-
type: 'signup',
201-
})
198+
const { error } = await signUpData.verifyOtp({ token: code })
202199
if (error) throw error
203200
} catch (error) {
204201
console.error('Failed to complete sign-up', error)

0 commit comments

Comments
 (0)