@ollaid/native-sso 1.0.0 → 1.0.2
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 +29 -8
- package/dist/components/LoginModal.d.ts +3 -2
- package/dist/components/NativeSSOPage.d.ts +3 -3
- package/dist/components/PasswordRecoveryModal.d.ts +1 -2
- package/dist/components/SignupModal.d.ts +3 -2
- package/dist/hooks/useMobilePassword.d.ts +0 -1
- package/dist/hooks/useMobileRegistration.d.ts +0 -1
- package/dist/hooks/useNativeAuth.d.ts +66 -6
- package/dist/index.cjs +91 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +91 -30
- package/dist/index.js.map +1 -1
- package/dist/services/api.d.ts +1 -0
- package/dist/services/nativeAuth.d.ts +4 -0
- package/dist/types/native.d.ts +5 -0
- package/package.json +1 -1
package/dist/services/api.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ declare const STORAGE: {
|
|
|
31
31
|
readonly TOKEN: "token";
|
|
32
32
|
readonly USER: "user";
|
|
33
33
|
readonly ACCOUNT_TYPE: "account_type";
|
|
34
|
+
readonly ALIAS_REFERENCE: "alias_reference";
|
|
34
35
|
};
|
|
35
36
|
export declare const setAuthToken: (token: string) => void;
|
|
36
37
|
export declare const getAuthToken: () => string | null;
|
|
@@ -8,6 +8,10 @@ import type { NativeAuthType, NativeEncryptRequest, NativeEncryptResponse, Nativ
|
|
|
8
8
|
export declare const nativeAuthService: {
|
|
9
9
|
hasCredentials(): boolean;
|
|
10
10
|
getCredentials(): NativeCredentials | null;
|
|
11
|
+
getCredentialsTtl(): number;
|
|
12
|
+
getCredentialsAge(): number;
|
|
13
|
+
areCredentialsExpiringSoon(): boolean;
|
|
14
|
+
ensureFreshCredentials(): Promise<void>;
|
|
11
15
|
loadCredentials(): Promise<NativeCredentials>;
|
|
12
16
|
encrypt(type: NativeAuthType, data: Partial<NativeEncryptRequest>): Promise<NativeEncryptResponse>;
|
|
13
17
|
init(nativeToken: string): Promise<NativeInitResponse>;
|
package/dist/types/native.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface NativeConfigResponse {
|
|
|
32
32
|
app_key: string;
|
|
33
33
|
encrypted_credentials: string;
|
|
34
34
|
debug?: boolean;
|
|
35
|
+
credentials_ttl?: number;
|
|
35
36
|
}
|
|
36
37
|
export interface NativeEncryptResponse {
|
|
37
38
|
success: boolean;
|
|
@@ -139,6 +140,8 @@ export interface NativeUser {
|
|
|
139
140
|
country?: string;
|
|
140
141
|
address?: string;
|
|
141
142
|
auth_2fa?: boolean;
|
|
143
|
+
alias_reference?: string;
|
|
144
|
+
iam_reference?: string;
|
|
142
145
|
}
|
|
143
146
|
export interface NativeExchangeResponse {
|
|
144
147
|
success: boolean;
|
|
@@ -151,6 +154,8 @@ export interface NativeExchangeResponse {
|
|
|
151
154
|
expires_at: string;
|
|
152
155
|
user: NativeUser;
|
|
153
156
|
user_infos?: UserInfos;
|
|
157
|
+
/** Alias reference retournée au niveau racine par certains backends SaaS */
|
|
158
|
+
alias_reference?: string;
|
|
154
159
|
}
|
|
155
160
|
export interface CheckTokenResponse {
|
|
156
161
|
success: boolean;
|