@ollaid/native-sso 2.1.3 → 2.5.0

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.
@@ -3,7 +3,7 @@
3
3
  * Flow: email → method-choice → OTP → new password → success
4
4
  * Design aligned with web SSO
5
5
  *
6
- * @version 1.0.0
6
+ * @version 2.5.0
7
7
  */
8
8
  export interface PasswordRecoveryModalProps {
9
9
  open: boolean;
@@ -8,9 +8,10 @@ interface PhoneInputProps {
8
8
  ccphone?: string;
9
9
  onCcphoneChange?: (value: string) => void;
10
10
  disabled?: boolean;
11
+ readOnly?: boolean;
11
12
  error?: string;
12
13
  placeholder?: string;
13
14
  lockCcphone?: boolean;
14
15
  }
15
- export declare function PhoneInput({ value, onChange, ccphone, onCcphoneChange, disabled, error, placeholder, lockCcphone, }: PhoneInputProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function PhoneInput({ value, onChange, ccphone, onCcphoneChange, disabled, readOnly, error, placeholder, lockCcphone, }: PhoneInputProps): import("react/jsx-runtime").JSX.Element;
16
17
  export default PhoneInput;
@@ -2,7 +2,7 @@
2
2
  * Signup Modal for @ollaid/native-sso — Design aligned with web SSO
3
3
  * Full signup flow: intro → account-type → info → OTP → password → confirm → success
4
4
  *
5
- * @version 1.0.0
5
+ * @version 2.5.0
6
6
  */
7
7
  import type { UserInfos } from '../types/native';
8
8
  export interface SignupModalProps {
@@ -3,7 +3,7 @@
3
3
  * Lightweight replacements for shadcn/ui components + inline SVG icons
4
4
  * No external dependencies required
5
5
  *
6
- * @version 1.0.0
6
+ * @version 2.5.0
7
7
  */
8
8
  import React from 'react';
9
9
  export declare function IconShieldCheck(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -30,9 +30,11 @@ export declare function Dialog({ open, onOpenChange, children }: {
30
30
  onOpenChange: (open: boolean) => void;
31
31
  children: React.ReactNode;
32
32
  }): import("react/jsx-runtime").JSX.Element | null;
33
- export declare function DialogContent({ children, className }: {
33
+ export declare function DialogContent({ children, className, style, hideCloseButton }: {
34
34
  children: React.ReactNode;
35
35
  className?: string;
36
+ style?: React.CSSProperties;
37
+ hideCloseButton?: boolean;
36
38
  }): import("react/jsx-runtime").JSX.Element;
37
39
  export declare function DialogBody({ children, className, style }: {
38
40
  children: React.ReactNode;
@@ -22,7 +22,7 @@
22
22
  * };
23
23
  * ```
24
24
  *
25
- * @version 1.0.0
25
+ * @version 2.5.0
26
26
  */
27
27
  export interface UseLogoutOptions {
28
28
  /** Callback appelé après une déconnexion réussie (redirection, toast, etc.) */
@@ -2,7 +2,7 @@
2
2
  * Hook de récupération de mot de passe v1.0
3
3
  * Architecture Frontend-First avec appels directs à l'IAM
4
4
  *
5
- * @version 1.0.0
5
+ * @version 2.5.0
6
6
  */
7
7
  export interface UseMobilePasswordOptions {
8
8
  saasApiUrl: string;
@@ -2,7 +2,7 @@
2
2
  * Hook d'inscription Mobile SSO v1.0
3
3
  * Gère le flow: init → verify-otp → complete
4
4
  *
5
- * @version 1.0.0
5
+ * @version 2.5.0
6
6
  */
7
7
  import type { MobileRegistrationFormData, AccountType } from '../types/mobile';
8
8
  interface RegistrationConflict {
@@ -2,7 +2,7 @@
2
2
  * Hook d'authentification Native SSO v1.0
3
3
  * Architecture Frontend-First avec appels directs à l'IAM
4
4
  *
5
- * @version 1.0.0
5
+ * @version 2.5.0
6
6
  */
7
7
  import type { NativeAuthStatus, NativeExchangeResponse, AccountType } from '../types/native';
8
8
  export interface UseNativeAuthOptions {
@@ -10,7 +10,7 @@
10
10
  * - Si 401 → révoque l'IAM (POST /iam/disconnect) + nettoie le frontend
11
11
  * - Ne déconnecte PAS si offline ou serveur inaccessible
12
12
  *
13
- * @version 2.0.0
13
+ * @version 2.5.0
14
14
  */
15
15
  import type { UserInfos } from '../types/native';
16
16
  export interface UseTokenHealthCheckOptions {
@@ -22,6 +22,16 @@ export interface UseTokenHealthCheckOptions {
22
22
  iamApiUrl: string;
23
23
  /** Called when the backend explicitly invalidates the token (401) */
24
24
  onTokenInvalid: () => void;
25
+ /**
26
+ * Optional handler for 401. If provided, it can attempt a refresh and decide
27
+ * whether the session was recovered.
28
+ *
29
+ * Return values:
30
+ * - 'recovered': session is valid again (do NOT call onTokenInvalid)
31
+ * - 'invalid': token is explicitly invalid (call onTokenInvalid)
32
+ * - 'noop': fall back to default behavior
33
+ */
34
+ onUnauthorized?: () => Promise<'recovered' | 'invalid' | 'noop'>;
25
35
  /** Called when fresh user_infos are received */
26
36
  onUserUpdated?: (userInfos: UserInfos) => void;
27
37
  /** Debug mode */