@chemmangat/msal-next 2.0.1 → 2.1.1

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
@@ -79,12 +79,6 @@ interface MsalAuthConfig {
79
79
  * Custom logger callback
80
80
  */
81
81
  loggerCallback?: (level: LogLevel, message: string, containsPii: boolean) => void;
82
- /**
83
- * Allowed redirect URIs for validation (optional but recommended)
84
- * Helps prevent open redirect vulnerabilities
85
- * @example ['https://myapp.com', 'http://localhost:3000']
86
- */
87
- allowedRedirectUris?: string[];
88
82
  /**
89
83
  * Loading component to show while MSAL initializes
90
84
  */
@@ -697,42 +691,6 @@ declare function getDebugLogger(config?: DebugLoggerConfig): DebugLogger;
697
691
  */
698
692
  declare function createScopedLogger(scope: string, config?: DebugLoggerConfig): DebugLogger;
699
693
 
700
- /**
701
- * Security utilities for input validation and sanitization
702
- */
703
- /**
704
- * Validate account data structure from cookie
705
- */
706
- interface ValidatedAccountData {
707
- homeAccountId: string;
708
- username: string;
709
- name?: string;
710
- }
711
- /**
712
- * Safely parse and validate JSON from untrusted sources
713
- */
714
- declare function safeJsonParse<T>(jsonString: string, validator: (data: any) => data is T): T | null;
715
- /**
716
- * Validate account data structure
717
- */
718
- declare function isValidAccountData(data: any): data is ValidatedAccountData;
719
- /**
720
- * Sanitize error messages to prevent information disclosure
721
- */
722
- declare function sanitizeError(error: unknown): string;
723
- /**
724
- * Validate redirect URI to prevent open redirect vulnerabilities
725
- */
726
- declare function isValidRedirectUri(uri: string, allowedOrigins: string[]): boolean;
727
- /**
728
- * Validate scope strings to prevent injection
729
- */
730
- declare function isValidScope(scope: string): boolean;
731
- /**
732
- * Validate array of scopes
733
- */
734
- declare function validateScopes(scopes: string[]): boolean;
735
-
736
694
  interface AuthMiddlewareConfig {
737
695
  /**
738
696
  * Routes that require authentication
@@ -805,9 +763,8 @@ interface ServerSession {
805
763
  username?: string;
806
764
  /**
807
765
  * Access token (if available in cookie)
808
- * @deprecated Storing tokens in cookies is not recommended for security reasons
809
766
  */
810
767
  accessToken?: string;
811
768
  }
812
769
 
813
- export { AuthGuard, type AuthGuardProps, type AuthMiddlewareConfig, AuthStatus, type AuthStatusProps, type CustomTokenClaims, type DebugLoggerConfig, ErrorBoundary, type ErrorBoundaryProps, type GraphApiOptions, MicrosoftSignInButton, type MicrosoftSignInButtonProps, type MsalAuthConfig, MsalAuthProvider, type MsalAuthProviderProps, type RetryConfig, type ServerSession, SignOutButton, type SignOutButtonProps, type UseGraphApiReturn, type UseMsalAuthReturn, type UseRolesReturn, type UseUserProfileReturn, UserAvatar, type UserAvatarProps, type UserProfile, type ValidatedAccountData, type WithAuthOptions, createAuthMiddleware, createMsalConfig, createRetryWrapper, createScopedLogger, getDebugLogger, getMsalInstance, isValidAccountData, isValidRedirectUri, isValidScope, retryWithBackoff, safeJsonParse, sanitizeError, useGraphApi, useMsalAuth, useRoles, useUserProfile, validateScopes, withAuth };
770
+ export { AuthGuard, type AuthGuardProps, type AuthMiddlewareConfig, AuthStatus, type AuthStatusProps, type CustomTokenClaims, type DebugLoggerConfig, ErrorBoundary, type ErrorBoundaryProps, type GraphApiOptions, MicrosoftSignInButton, type MicrosoftSignInButtonProps, type MsalAuthConfig, MsalAuthProvider, type MsalAuthProviderProps, type RetryConfig, type ServerSession, SignOutButton, type SignOutButtonProps, type UseGraphApiReturn, type UseMsalAuthReturn, type UseRolesReturn, type UseUserProfileReturn, UserAvatar, type UserAvatarProps, type UserProfile, type WithAuthOptions, createAuthMiddleware, createMsalConfig, createRetryWrapper, createScopedLogger, getDebugLogger, getMsalInstance, retryWithBackoff, useGraphApi, useMsalAuth, useRoles, useUserProfile, withAuth };
package/dist/index.d.ts CHANGED
@@ -79,12 +79,6 @@ interface MsalAuthConfig {
79
79
  * Custom logger callback
80
80
  */
81
81
  loggerCallback?: (level: LogLevel, message: string, containsPii: boolean) => void;
82
- /**
83
- * Allowed redirect URIs for validation (optional but recommended)
84
- * Helps prevent open redirect vulnerabilities
85
- * @example ['https://myapp.com', 'http://localhost:3000']
86
- */
87
- allowedRedirectUris?: string[];
88
82
  /**
89
83
  * Loading component to show while MSAL initializes
90
84
  */
@@ -697,42 +691,6 @@ declare function getDebugLogger(config?: DebugLoggerConfig): DebugLogger;
697
691
  */
698
692
  declare function createScopedLogger(scope: string, config?: DebugLoggerConfig): DebugLogger;
699
693
 
700
- /**
701
- * Security utilities for input validation and sanitization
702
- */
703
- /**
704
- * Validate account data structure from cookie
705
- */
706
- interface ValidatedAccountData {
707
- homeAccountId: string;
708
- username: string;
709
- name?: string;
710
- }
711
- /**
712
- * Safely parse and validate JSON from untrusted sources
713
- */
714
- declare function safeJsonParse<T>(jsonString: string, validator: (data: any) => data is T): T | null;
715
- /**
716
- * Validate account data structure
717
- */
718
- declare function isValidAccountData(data: any): data is ValidatedAccountData;
719
- /**
720
- * Sanitize error messages to prevent information disclosure
721
- */
722
- declare function sanitizeError(error: unknown): string;
723
- /**
724
- * Validate redirect URI to prevent open redirect vulnerabilities
725
- */
726
- declare function isValidRedirectUri(uri: string, allowedOrigins: string[]): boolean;
727
- /**
728
- * Validate scope strings to prevent injection
729
- */
730
- declare function isValidScope(scope: string): boolean;
731
- /**
732
- * Validate array of scopes
733
- */
734
- declare function validateScopes(scopes: string[]): boolean;
735
-
736
694
  interface AuthMiddlewareConfig {
737
695
  /**
738
696
  * Routes that require authentication
@@ -805,9 +763,8 @@ interface ServerSession {
805
763
  username?: string;
806
764
  /**
807
765
  * Access token (if available in cookie)
808
- * @deprecated Storing tokens in cookies is not recommended for security reasons
809
766
  */
810
767
  accessToken?: string;
811
768
  }
812
769
 
813
- export { AuthGuard, type AuthGuardProps, type AuthMiddlewareConfig, AuthStatus, type AuthStatusProps, type CustomTokenClaims, type DebugLoggerConfig, ErrorBoundary, type ErrorBoundaryProps, type GraphApiOptions, MicrosoftSignInButton, type MicrosoftSignInButtonProps, type MsalAuthConfig, MsalAuthProvider, type MsalAuthProviderProps, type RetryConfig, type ServerSession, SignOutButton, type SignOutButtonProps, type UseGraphApiReturn, type UseMsalAuthReturn, type UseRolesReturn, type UseUserProfileReturn, UserAvatar, type UserAvatarProps, type UserProfile, type ValidatedAccountData, type WithAuthOptions, createAuthMiddleware, createMsalConfig, createRetryWrapper, createScopedLogger, getDebugLogger, getMsalInstance, isValidAccountData, isValidRedirectUri, isValidScope, retryWithBackoff, safeJsonParse, sanitizeError, useGraphApi, useMsalAuth, useRoles, useUserProfile, validateScopes, withAuth };
770
+ export { AuthGuard, type AuthGuardProps, type AuthMiddlewareConfig, AuthStatus, type AuthStatusProps, type CustomTokenClaims, type DebugLoggerConfig, ErrorBoundary, type ErrorBoundaryProps, type GraphApiOptions, MicrosoftSignInButton, type MicrosoftSignInButtonProps, type MsalAuthConfig, MsalAuthProvider, type MsalAuthProviderProps, type RetryConfig, type ServerSession, SignOutButton, type SignOutButtonProps, type UseGraphApiReturn, type UseMsalAuthReturn, type UseRolesReturn, type UseUserProfileReturn, UserAvatar, type UserAvatarProps, type UserProfile, type WithAuthOptions, createAuthMiddleware, createMsalConfig, createRetryWrapper, createScopedLogger, getDebugLogger, getMsalInstance, retryWithBackoff, useGraphApi, useMsalAuth, useRoles, useUserProfile, withAuth };