@nextsparkjs/ai-workflow 0.1.0-beta.118 → 0.1.0-beta.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -340,7 +340,8 @@ Registration behavior is configurable at the theme level via `auth` in `app.conf
340
340
  | Mode | Email Signup | Google OAuth Signup | Email Login | Google Login | Signup Page |
341
341
  |------|-------------|-------------------|-------------|-------------|-------------|
342
342
  | `open` (default) | Yes | Yes | Yes | Yes | Visible |
343
- | `domain-restricted` | No | Only allowed domains | Yes | Yes | Hidden |
343
+ | `domain-restricted` | No | Only allowed domains | No | Only allowed domains | Hidden |
344
+ | `domain-open` | Only allowed domains | Only allowed domains | Only allowed domains | Only allowed domains | Visible |
344
345
  | `invitation-only` | Via invite | Via invite | Yes | Configurable | Invite only |
345
346
 
346
347
  ### Theme Configuration
@@ -353,7 +354,7 @@ auth: {
353
354
  registration: { mode: 'open' },
354
355
  }
355
356
 
356
- // Option 2: Only Google OAuth for specific domains
357
+ // Option 2: Only Google OAuth for specific domains (no email+password)
357
358
  auth: {
358
359
  registration: {
359
360
  mode: 'domain-restricted',
@@ -361,7 +362,15 @@ auth: {
361
362
  },
362
363
  }
363
364
 
364
- // Option 3: Invitation-only (integrates with single-tenant teams mode)
365
+ // Option 3: Email+password AND Google OAuth, restricted to specific domains
366
+ auth: {
367
+ registration: {
368
+ mode: 'domain-open',
369
+ allowedDomains: ['nextspark.dev', 'mycompany.com'],
370
+ },
371
+ }
372
+
373
+ // Option 4: Invitation-only (integrates with single-tenant teams mode)
365
374
  auth: {
366
375
  registration: { mode: 'invitation-only' },
367
376
  }
@@ -371,12 +380,12 @@ auth: {
371
380
 
372
381
  ```typescript
373
382
  // packages/core/src/lib/config/types.ts
374
- type RegistrationMode = 'open' | 'domain-restricted' | 'invitation-only'
383
+ type RegistrationMode = 'open' | 'domain-restricted' | 'domain-open' | 'invitation-only'
375
384
 
376
385
  interface AuthConfig {
377
386
  registration: {
378
387
  mode: RegistrationMode
379
- allowedDomains?: string[] // For 'domain-restricted' mode
388
+ allowedDomains?: string[] // For 'domain-restricted' and 'domain-open' modes
380
389
  }
381
390
  providers?: {
382
391
  google?: { enabled?: boolean }
@@ -399,8 +408,9 @@ import {
399
408
  ### Enforcement Points
400
409
 
401
410
  1. **Route handler** (`app/api/auth/[...all]/route.ts`): Blocks email signup for `domain-restricted` and `invitation-only` modes
402
- 2. **Database hook** (`auth.ts` → `databaseHooks.user.create.before`): Validates email domain for `domain-restricted` mode; blocks signup in `invitation-only` mode when team exists
403
- 3. **Signup page** (`app/(auth)/signup/page.tsx`): Redirects to `/login` for `domain-restricted` and `invitation-only`
411
+ 2. **Database hook** (`auth.ts` → `databaseHooks.user.create.before`): Validates email domain for `domain-restricted` and `domain-open` modes; blocks signup in `invitation-only` mode when team exists
412
+ 3. **Session hook** (`auth.ts` → `databaseHooks.session.create.before`): Validates email domain on every login for `domain-restricted` and `domain-open` modes
413
+ 4. **Signup page** (`app/(auth)/signup/page.tsx`): Redirects to `/login` for `domain-restricted` and `invitation-only`
404
414
  4. **LoginForm**: Hides Google OAuth button and signup link based on mode
405
415
  5. **SignupForm**: Hides Google button when disabled
406
416
 
@@ -411,7 +421,7 @@ Use `PUBLIC_AUTH_CONFIG` (from `config-sync.ts`) in client components. This stri
411
421
  ```typescript
412
422
  import { PUBLIC_AUTH_CONFIG } from '@/core/lib/config/config-sync'
413
423
 
414
- // PUBLIC_AUTH_CONFIG.registration.mode → 'open' | 'domain-restricted' | 'invitation-only'
424
+ // PUBLIC_AUTH_CONFIG.registration.mode → 'open' | 'domain-restricted' | 'domain-open' | 'invitation-only'
415
425
  // PUBLIC_AUTH_CONFIG.providers.google.enabled → boolean
416
426
  ```
417
427
 
@@ -111,7 +111,7 @@ type EntityFieldType =
111
111
  | 'select' | 'multiselect' | 'radio' | 'buttongroup' | 'tags' | 'combobox'
112
112
 
113
113
  // Media
114
- | 'file' | 'image' | 'video' | 'audio'
114
+ | 'file' | 'image' | 'video' | 'audio' | 'media-library'
115
115
 
116
116
  // Specialized
117
117
  | 'phone' | 'rating' | 'range' | 'doublerange'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/ai-workflow",
3
- "version": "0.1.0-beta.118",
3
+ "version": "0.1.0-beta.120",
4
4
  "description": "AI workflow templates for NextSpark - Claude Code agents, commands, skills, and multi-editor support",
5
5
  "license": "MIT",
6
6
  "author": "NextSpark <hello@nextspark.dev>",