@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.
@@ -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>;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ollaid/native-sso",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Package NPM fullstack pour l'authentification Native SSO Ollaid - Frontend-First",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",