@digilogiclabs/saas-factory-auth 1.0.3 → 1.0.4

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.
package/dist/index.d.mts CHANGED
@@ -252,6 +252,13 @@ declare enum AuthEvent {
252
252
  TOKEN_REFRESHED = "TOKEN_REFRESHED",
253
253
  USER_UPDATED = "USER_UPDATED"
254
254
  }
255
+ /**
256
+ * Supported authentication provider types
257
+ */
258
+ declare enum AuthProviderType$1 {
259
+ SUPABASE = "supabase",
260
+ FIREBASE = "firebase"
261
+ }
255
262
  /**
256
263
  * OAuth provider types supported by the auth system
257
264
  */
@@ -294,17 +301,28 @@ interface AuthConfig {
294
301
  password?: PasswordConfig;
295
302
  passwordRequirements?: PasswordConfig;
296
303
  }
304
+ /**
305
+ * OAuth result data for React Native deep linking
306
+ */
307
+ interface AuthResult {
308
+ user: User | null;
309
+ session: AuthSession | null;
310
+ error?: Error | null;
311
+ }
297
312
  /**
298
313
  * Props for AuthForm component
299
314
  */
300
315
  interface AuthFormProps {
301
316
  defaultMode?: AuthMode;
302
- onSuccess?: () => void;
303
- onError?: (error: Error) => void;
304
- redirectTo?: string;
305
- providers?: OAuthProvider[];
306
- allowMagicLink?: boolean;
307
- className?: string;
317
+ onSuccess?: (() => void) | undefined;
318
+ onError?: ((error: Error) => void) | undefined;
319
+ redirectTo?: string | undefined;
320
+ redirectUrl?: string | undefined;
321
+ providers?: OAuthProvider[] | undefined;
322
+ allowMagicLink?: boolean | undefined;
323
+ className?: string | undefined;
324
+ onOAuthSuccess?: ((result: AuthResult) => void) | undefined;
325
+ appScheme?: string | undefined;
308
326
  }
309
327
 
310
328
  interface AuthStore {
@@ -348,6 +366,58 @@ interface AuthProviderProps {
348
366
  }
349
367
  declare const AuthProvider: React.FC<AuthProviderProps>;
350
368
 
369
+ interface LoginFormProps extends Omit<AuthFormProps, 'defaultMode'> {
370
+ /**
371
+ * Override the redirect URL after successful login
372
+ */
373
+ redirectTo?: string;
374
+ /**
375
+ * Show magic link option
376
+ */
377
+ allowMagicLink?: boolean;
378
+ /**
379
+ * Show password reset link
380
+ */
381
+ allowPasswordReset?: boolean;
382
+ /**
383
+ * Show signup link
384
+ */
385
+ allowSignup?: boolean;
386
+ /**
387
+ * Custom className for styling
388
+ */
389
+ className?: string;
390
+ }
391
+ declare const LoginForm: React.FC<LoginFormProps>;
392
+
393
+ interface SignupFormProps extends Omit<AuthFormProps, 'defaultMode'> {
394
+ /**
395
+ * Override the redirect URL after successful signup
396
+ */
397
+ redirectTo?: string;
398
+ /**
399
+ * Show login link
400
+ */
401
+ allowLogin?: boolean;
402
+ /**
403
+ * Require terms of service acceptance
404
+ */
405
+ requireTerms?: boolean;
406
+ /**
407
+ * Terms of service URL
408
+ */
409
+ termsUrl?: string;
410
+ /**
411
+ * Privacy policy URL
412
+ */
413
+ privacyUrl?: string;
414
+ /**
415
+ * Custom className for styling
416
+ */
417
+ className?: string;
418
+ }
419
+ declare const SignupForm: React.FC<SignupFormProps>;
420
+
351
421
  interface AuthState extends AuthStore {
352
422
  authProvider: IAuthProvider | null;
353
423
  setAuthProvider: (provider: IAuthProvider) => void;
@@ -494,4 +564,4 @@ declare function withAuth(request: NextRequest): {
494
564
  supabase: _supabase_supabase_js.SupabaseClient<any, "public", any>;
495
565
  };
496
566
 
497
- export { type AuthConfig, AuthEvent, type AuthFormProps, type AuthMode, AuthProvider, AuthProviderFactory, type AuthSession, type AuthStore, type OAuthProvider, type PasswordConfig, type User, type UserRole, createClient as createSupabaseClient, resetPassword, signIn, signInWithMagicLink, signInWithOAuth, signOut, signUp, updateProfile, useAuth, withAuth };
567
+ export { type AuthConfig, AuthEvent, type AuthFormProps, type AuthMode, AuthProvider, AuthProviderFactory, AuthProviderType$1 as AuthProviderType, type AuthSession, type AuthStore, LoginForm, type OAuthProvider, type PasswordConfig, SignupForm, type User, type UserRole, createClient as createSupabaseClient, resetPassword, signIn, signInWithMagicLink, signInWithOAuth, signOut, signUp, updateProfile, useAuth, withAuth };
package/dist/index.d.ts CHANGED
@@ -252,6 +252,13 @@ declare enum AuthEvent {
252
252
  TOKEN_REFRESHED = "TOKEN_REFRESHED",
253
253
  USER_UPDATED = "USER_UPDATED"
254
254
  }
255
+ /**
256
+ * Supported authentication provider types
257
+ */
258
+ declare enum AuthProviderType$1 {
259
+ SUPABASE = "supabase",
260
+ FIREBASE = "firebase"
261
+ }
255
262
  /**
256
263
  * OAuth provider types supported by the auth system
257
264
  */
@@ -294,17 +301,28 @@ interface AuthConfig {
294
301
  password?: PasswordConfig;
295
302
  passwordRequirements?: PasswordConfig;
296
303
  }
304
+ /**
305
+ * OAuth result data for React Native deep linking
306
+ */
307
+ interface AuthResult {
308
+ user: User | null;
309
+ session: AuthSession | null;
310
+ error?: Error | null;
311
+ }
297
312
  /**
298
313
  * Props for AuthForm component
299
314
  */
300
315
  interface AuthFormProps {
301
316
  defaultMode?: AuthMode;
302
- onSuccess?: () => void;
303
- onError?: (error: Error) => void;
304
- redirectTo?: string;
305
- providers?: OAuthProvider[];
306
- allowMagicLink?: boolean;
307
- className?: string;
317
+ onSuccess?: (() => void) | undefined;
318
+ onError?: ((error: Error) => void) | undefined;
319
+ redirectTo?: string | undefined;
320
+ redirectUrl?: string | undefined;
321
+ providers?: OAuthProvider[] | undefined;
322
+ allowMagicLink?: boolean | undefined;
323
+ className?: string | undefined;
324
+ onOAuthSuccess?: ((result: AuthResult) => void) | undefined;
325
+ appScheme?: string | undefined;
308
326
  }
309
327
 
310
328
  interface AuthStore {
@@ -348,6 +366,58 @@ interface AuthProviderProps {
348
366
  }
349
367
  declare const AuthProvider: React.FC<AuthProviderProps>;
350
368
 
369
+ interface LoginFormProps extends Omit<AuthFormProps, 'defaultMode'> {
370
+ /**
371
+ * Override the redirect URL after successful login
372
+ */
373
+ redirectTo?: string;
374
+ /**
375
+ * Show magic link option
376
+ */
377
+ allowMagicLink?: boolean;
378
+ /**
379
+ * Show password reset link
380
+ */
381
+ allowPasswordReset?: boolean;
382
+ /**
383
+ * Show signup link
384
+ */
385
+ allowSignup?: boolean;
386
+ /**
387
+ * Custom className for styling
388
+ */
389
+ className?: string;
390
+ }
391
+ declare const LoginForm: React.FC<LoginFormProps>;
392
+
393
+ interface SignupFormProps extends Omit<AuthFormProps, 'defaultMode'> {
394
+ /**
395
+ * Override the redirect URL after successful signup
396
+ */
397
+ redirectTo?: string;
398
+ /**
399
+ * Show login link
400
+ */
401
+ allowLogin?: boolean;
402
+ /**
403
+ * Require terms of service acceptance
404
+ */
405
+ requireTerms?: boolean;
406
+ /**
407
+ * Terms of service URL
408
+ */
409
+ termsUrl?: string;
410
+ /**
411
+ * Privacy policy URL
412
+ */
413
+ privacyUrl?: string;
414
+ /**
415
+ * Custom className for styling
416
+ */
417
+ className?: string;
418
+ }
419
+ declare const SignupForm: React.FC<SignupFormProps>;
420
+
351
421
  interface AuthState extends AuthStore {
352
422
  authProvider: IAuthProvider | null;
353
423
  setAuthProvider: (provider: IAuthProvider) => void;
@@ -494,4 +564,4 @@ declare function withAuth(request: NextRequest): {
494
564
  supabase: _supabase_supabase_js.SupabaseClient<any, "public", any>;
495
565
  };
496
566
 
497
- export { type AuthConfig, AuthEvent, type AuthFormProps, type AuthMode, AuthProvider, AuthProviderFactory, type AuthSession, type AuthStore, type OAuthProvider, type PasswordConfig, type User, type UserRole, createClient as createSupabaseClient, resetPassword, signIn, signInWithMagicLink, signInWithOAuth, signOut, signUp, updateProfile, useAuth, withAuth };
567
+ export { type AuthConfig, AuthEvent, type AuthFormProps, type AuthMode, AuthProvider, AuthProviderFactory, AuthProviderType$1 as AuthProviderType, type AuthSession, type AuthStore, LoginForm, type OAuthProvider, type PasswordConfig, SignupForm, type User, type UserRole, createClient as createSupabaseClient, resetPassword, signIn, signInWithMagicLink, signInWithOAuth, signOut, signUp, updateProfile, useAuth, withAuth };