mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 12:10:11 +00:00
feat: add email verification check for cloud onboarding (#5636)
## Summary
- Added email verification flow for new users during onboarding
- Implemented invite code claiming with proper validation
- Updated API endpoints from `/invite/` to `/invite_code/` for
consistency
## Changes
### Email Verification
- Added `CloudVerifyEmailView` component with email verification UI
- Added email verification check after login in `CloudLoginView`
- Added `isEmailVerified` property to Firebase auth store
- Users must verify email before claiming invite codes
### Invite Code Flow
- Enhanced `CloudClaimInviteView` with full claim invite functionality
- Updated `InviteCheckView` to route users based on email verification
status
- Modified API to return both `claimed` and `expired` status for invite
codes
- Added proper error handling and Sentry logging for invite operations
### API Updates
- Changed endpoint paths from `/invite/` to `/invite_code/`
- Updated `getInviteCodeStatus()` to return `{ claimed: boolean;
expired: boolean }`
- Updated `claimInvite()` to return `{ success: boolean; message: string
}`
### UI/UX Improvements
- Added Korean translations for all new strings
- Improved button styling and layout in survey and waitlist views
- Added proper loading states and error handling
## Test Plan
- [ ] Test new user signup flow with email verification
- [ ] Test invite code validation (expired/claimed/valid codes)
- [ ] Test email verification redirect flow
- [ ] Test invite claiming after email verification
- [ ] Verify Korean translations display correctly
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
import { nextTick, onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import { getInviteCodeStatus } from '@/api/auth'
|
||||
|
||||
import CloudClaimInviteViewSkeleton from './skeletons/CloudClaimInviteViewSkeleton.vue'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -17,19 +15,17 @@ onMounted(async () => {
|
||||
await nextTick()
|
||||
|
||||
const inviteCode = route.query.inviteCode as string
|
||||
const inviteCodeStatus = await getInviteCodeStatus(inviteCode)
|
||||
|
||||
// TODO: should be deleted when api is ready
|
||||
// if (!status.emailVerified) {
|
||||
// await router.push({ name: 'cloud-verify-email' })
|
||||
// return
|
||||
// }
|
||||
|
||||
if (inviteCodeStatus.expired) {
|
||||
await router.push({ name: 'cloud-sorry-contact-support' })
|
||||
try {
|
||||
// Basic guard: missing invite code -> send to support
|
||||
if (!inviteCode || typeof inviteCode !== 'string') {
|
||||
await router.push({ name: 'cloud-sorry-contact-support' })
|
||||
return
|
||||
}
|
||||
await router.push({ name: 'cloud-claim-invite', query: { inviteCode } })
|
||||
} catch (e) {
|
||||
window.open('https://support.comfy.org', '_blank', 'noopener')
|
||||
return
|
||||
}
|
||||
|
||||
await router.push({ name: 'cloud-claim-invite' })
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user