@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.
- package/README.md +202 -55
- package/dist/components/AvatarCropModal.d.ts +16 -0
- package/dist/components/DebugPanel.d.ts +7 -2
- package/dist/components/LoginModal.d.ts +2 -2
- package/dist/components/NativeSSOPage.d.ts +8 -2
- package/dist/components/OnboardingModal.d.ts +14 -7
- package/dist/components/PasswordRecoveryModal.d.ts +1 -1
- package/dist/components/PhoneInput.d.ts +2 -1
- package/dist/components/SignupModal.d.ts +1 -1
- package/dist/components/ui.d.ts +4 -2
- package/dist/hooks/useLogout.d.ts +1 -1
- package/dist/hooks/useMobilePassword.d.ts +1 -1
- package/dist/hooks/useMobileRegistration.d.ts +1 -1
- package/dist/hooks/useNativeAuth.d.ts +1 -1
- package/dist/hooks/useTokenHealthCheck.d.ts +11 -1
- package/dist/index.cjs +2075 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +2076 -203
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/services/api.d.ts +28 -1
- package/dist/services/debugLogger.d.ts +1 -1
- package/dist/services/iamAccount.d.ts +1 -1
- package/dist/services/mobilePassword.d.ts +1 -1
- package/dist/services/mobileRegistration.d.ts +1 -1
- package/dist/services/nativeAuth.d.ts +3 -2
- package/dist/services/profile.d.ts +31 -0
- package/dist/services/profileChange.d.ts +30 -0
- package/dist/services/profileMedia.d.ts +16 -0
- package/dist/types/mobile.d.ts +1 -1
- package/dist/types/native.d.ts +23 -1
- package/package.json +2 -2
|
@@ -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
|
|
5
|
+
* @version 2.5.0
|
|
6
6
|
*/
|
|
7
7
|
import type { UserInfos } from '../types/native';
|
|
8
8
|
export interface SignupModalProps {
|
package/dist/components/ui.d.ts
CHANGED
|
@@ -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
|
|
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;
|
|
@@ -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
|
|
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.
|
|
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 */
|