@payez/next-mvp 4.0.21 → 4.0.23

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.
@@ -13,7 +13,7 @@ import type { FederatedProvider } from '../types/auth';
13
13
  export interface PublicAuthSettings {
14
14
  enabledProviders: FederatedProvider[];
15
15
  allowPublicRegistration: boolean;
16
- allowSocialLogin: boolean;
16
+ allowFederatedLogin: boolean;
17
17
  enablePasswordReset: boolean;
18
18
  require2FA: boolean;
19
19
  allowed2FAMethods: string[];
@@ -38,7 +38,7 @@ const PROVIDER_MAP: Record<string, FederatedProvider> = {
38
38
  const DEFAULT_SETTINGS: PublicAuthSettings = {
39
39
  enabledProviders: [],
40
40
  allowPublicRegistration: true,
41
- allowSocialLogin: false,
41
+ allowFederatedLogin: false,
42
42
  enablePasswordReset: true,
43
43
  require2FA: true,
44
44
  allowed2FAMethods: ['email', 'sms'],
@@ -56,7 +56,7 @@ const DEFAULT_SETTINGS: PublicAuthSettings = {
56
56
  *
57
57
  * return (
58
58
  * <>
59
- * {settings?.allowSocialLogin && (
59
+ * {settings?.allowFederatedLogin && (
60
60
  * <FederatedAuthSection providers={settings.enabledProviders} />
61
61
  * )}
62
62
  * {settings?.allowPublicRegistration && (
@@ -125,11 +125,11 @@ export function usePublicAuthSettings(): UsePublicAuthSettingsResult {
125
125
  }
126
126
 
127
127
  /**
128
- * Hook to check if social login is enabled.
128
+ * Hook to check if federated (OAuth) login is enabled.
129
129
  */
130
- export function useSocialLoginEnabled(): boolean {
130
+ export function useFederatedLoginEnabled(): boolean {
131
131
  const { settings } = usePublicAuthSettings();
132
- return settings?.allowSocialLogin ?? false;
132
+ return settings?.allowFederatedLogin ?? false;
133
133
  }
134
134
 
135
135
  /**