@ollaid/native-sso 2.7.3 → 2.7.5
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/components/LoginModal.d.ts +2 -1
- package/dist/components/SignupModal.d.ts +2 -1
- package/dist/components/ui.d.ts +1 -0
- package/dist/hooks/useMobileRegistration.d.ts +8 -0
- package/dist/hooks/useNativeAuth.d.ts +6 -0
- package/dist/index.cjs +247 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +247 -65
- package/dist/index.js.map +1 -1
- package/dist/types/mobile.d.ts +2 -0
- package/dist/types/native.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export interface LoginModalProps {
|
|
|
12
12
|
onLoginSuccess?: (token: string, user: UserInfos) => void;
|
|
13
13
|
saasApiUrl: string;
|
|
14
14
|
iamApiUrl: string;
|
|
15
|
+
logoUrl?: string;
|
|
15
16
|
loading?: boolean;
|
|
16
17
|
showSwitchToSignup?: boolean;
|
|
17
18
|
/** Type de compte par défaut à persister dans localStorage */
|
|
@@ -19,5 +20,5 @@ export interface LoginModalProps {
|
|
|
19
20
|
/** Pre-fill phone number and go directly to phone-input step */
|
|
20
21
|
initialPhone?: string;
|
|
21
22
|
}
|
|
22
|
-
export declare function LoginModal({ open, onOpenChange, onSwitchToSignup, onLoginSuccess, saasApiUrl, iamApiUrl, loading, showSwitchToSignup, defaultAccountType, initialPhone, }: LoginModalProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function LoginModal({ open, onOpenChange, onSwitchToSignup, onLoginSuccess, saasApiUrl, iamApiUrl, logoUrl, loading, showSwitchToSignup, defaultAccountType, initialPhone, }: LoginModalProps): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default LoginModal;
|
|
@@ -12,10 +12,11 @@ export interface SignupModalProps {
|
|
|
12
12
|
onSignupSuccess: (token: string, user: UserInfos) => void;
|
|
13
13
|
saasApiUrl: string;
|
|
14
14
|
iamApiUrl: string;
|
|
15
|
+
logoUrl?: string;
|
|
15
16
|
/** Type de compte par défaut à persister dans localStorage */
|
|
16
17
|
defaultAccountType?: 'user' | 'client';
|
|
17
18
|
/** Called when conflict resolution wants to switch to login with a pre-filled phone */
|
|
18
19
|
onSwitchToLoginWithPhone?: (phone: string) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare function SignupModal({ open, onOpenChange, onSwitchToLogin, onSignupSuccess, saasApiUrl, iamApiUrl, defaultAccountType, onSwitchToLoginWithPhone }: SignupModalProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function SignupModal({ open, onOpenChange, onSwitchToLogin, onSignupSuccess, saasApiUrl, iamApiUrl, logoUrl, defaultAccountType, onSwitchToLoginWithPhone }: SignupModalProps): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default SignupModal;
|
package/dist/components/ui.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function IconMail(props: React.SVGProps<SVGSVGElement>): import("
|
|
|
11
11
|
export declare function IconPhone(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare function IconLock(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare function IconKeyRound(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function IconLink(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare function IconArrowLeft(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare function IconEye(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export declare function IconEyeOff(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,6 +27,8 @@ export declare function useMobileRegistration(options?: UseMobileRegistrationOpt
|
|
|
27
27
|
loading: boolean;
|
|
28
28
|
error: string | null;
|
|
29
29
|
conflict: RegistrationConflict | null;
|
|
30
|
+
otpMethod: "email" | "sms" | null;
|
|
31
|
+
otpSentTo: string | null;
|
|
30
32
|
isCompleted: boolean;
|
|
31
33
|
hasConflict: boolean;
|
|
32
34
|
accountType: AccountType;
|
|
@@ -130,16 +132,22 @@ export declare function useMobileRegistration(options?: UseMobileRegistrationOpt
|
|
|
130
132
|
error: string;
|
|
131
133
|
cooldown?: undefined;
|
|
132
134
|
otp_code_dev?: undefined;
|
|
135
|
+
otp_method?: undefined;
|
|
136
|
+
otp_sent_to?: undefined;
|
|
133
137
|
} | {
|
|
134
138
|
success: boolean;
|
|
135
139
|
cooldown: number | undefined;
|
|
136
140
|
otp_code_dev: string | undefined;
|
|
141
|
+
otp_method: "email" | "sms" | undefined;
|
|
142
|
+
otp_sent_to: string | undefined;
|
|
137
143
|
error?: undefined;
|
|
138
144
|
} | {
|
|
139
145
|
success: boolean;
|
|
140
146
|
error?: undefined;
|
|
141
147
|
cooldown?: undefined;
|
|
142
148
|
otp_code_dev?: undefined;
|
|
149
|
+
otp_method?: undefined;
|
|
150
|
+
otp_sent_to?: undefined;
|
|
143
151
|
}>;
|
|
144
152
|
reset: () => void;
|
|
145
153
|
clearError: () => void;
|
|
@@ -294,11 +294,15 @@ export declare function useNativeAuth(options: UseNativeAuthOptions): {
|
|
|
294
294
|
cooldown?: undefined;
|
|
295
295
|
message?: undefined;
|
|
296
296
|
otp_code_dev?: undefined;
|
|
297
|
+
otp_method?: undefined;
|
|
298
|
+
otp_sent_to?: undefined;
|
|
297
299
|
} | {
|
|
298
300
|
success: boolean;
|
|
299
301
|
cooldown: number | undefined;
|
|
300
302
|
message: string | undefined;
|
|
301
303
|
otp_code_dev: string | undefined;
|
|
304
|
+
otp_method: "email" | "sms" | undefined;
|
|
305
|
+
otp_sent_to: string | undefined;
|
|
302
306
|
error?: undefined;
|
|
303
307
|
} | {
|
|
304
308
|
success: boolean;
|
|
@@ -306,6 +310,8 @@ export declare function useNativeAuth(options: UseNativeAuthOptions): {
|
|
|
306
310
|
cooldown?: undefined;
|
|
307
311
|
message?: undefined;
|
|
308
312
|
otp_code_dev?: undefined;
|
|
313
|
+
otp_method?: undefined;
|
|
314
|
+
otp_sent_to?: undefined;
|
|
309
315
|
}>;
|
|
310
316
|
setSession: (data: NativeExchangeResponse) => void;
|
|
311
317
|
logout: () => Promise<void>;
|