docs(auth): document the OTP verification flow on register, verifyOtp, resendOtp#196
docs(auth): document the OTP verification flow on register, verifyOtp, resendOtp#196wixysam merged 1 commit intomainbase44/javascript-sdk:mainfrom fix-register-verifyotpbase44/javascript-sdk:fix-register-verifyotpCopy head branch name to clipboard
Conversation
…, and resendOtp The register() example was missing the verifyOtp() step, so developers who followed the docs ended up with unverified users who could not log in. The verifyOtp() and resendOtp() JSDoc was also thin and lacked example titles. - register(): example now shows register, verifyOtp, then loginViaEmailPassword. - verifyOtp(): describes what verification accomplishes, links the surrounding methods, and adds a second example covering the full flow. - resendOtp(): explains when to call it and links back to register and verifyOtp. - Returns descriptions stay in prose since the methods still return Promise<any>. A follow-up PR will introduce real response types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @wixysam's task —— View job PR Review: OTP Verification Flow DocumentationI've reviewed the documentation changes for the auth module's OTP verification flow. Here's my comprehensive feedback: ✅ Code Quality and Best PracticesThe documentation improvements are well-structured and follow JSDoc best practices:
✅ Completeness and AccuracyThe changes effectively address the missing verification step:
|
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.32-pr.196.8c75df2Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.32-pr.196.8c75df2"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.32-pr.196.8c75df2"
}
}
Preview published to npm registry — try new features instantly! |
Summary
register()example was missing theverifyOtp()step. Developers who followed the docs ended up with unverified users who could not log in. The example now shows register, verifyOtp, thenloginViaEmailPassword().verifyOtp()JSDoc now explains what verification actually does, links the surrounding methods, and includes a second example covering the full registration flow.resendOtp()JSDoc explains when to call it and links back toregister()andverifyOtp().@returnsdescriptions stay in prose since the methods still returnPromise<any>. A follow-up PR will introduce real response types.Follow-up
There's an open question about whether
verifyOtp()should callsetToken()after success, since the backend already issues a JWT and sets a cookie. That belongs in the typing PR, not this doc fix.Test plan
npm run create-docs-localgenerates clean mintlify output forauth.mdx.🤖 Generated with Claude Code