@ollaid/native-sso 1.0.2 → 1.0.4

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.
@@ -21,6 +21,13 @@ export interface NativeAuthConfig {
21
21
  timeout?: number;
22
22
  /** Mode debug (logs console) */
23
23
  debug?: boolean;
24
+ /**
25
+ * Préfixe de configuration IAM côté backend (défaut: 'iam').
26
+ * Permet le multi-tenant : chaque frontend envoie son préfixe
27
+ * pour que le backend SaaS lise le bon bloc config/services.php.
28
+ * Ex: 'iam', 'iam_vendor', 'iam_client', 'iam_admin'
29
+ */
30
+ configPrefix?: string;
24
31
  }
25
32
  export declare const setNativeAuthConfig: (newConfig: Partial<NativeAuthConfig>) => void;
26
33
  export declare const getNativeAuthConfig: () => NativeAuthConfig;
@@ -42,7 +49,7 @@ export declare const setAccountType: (type: string) => void;
42
49
  export declare const getAccountType: () => string | null;
43
50
  export { STORAGE as STORAGE_KEYS };
44
51
  export declare function fetchWithTimeout<T>(url: string, options: RequestInit, timeout: number): Promise<T>;
45
- export declare function getHeaders(token?: string): HeadersInit;
52
+ export declare function getHeaders(token?: string, includeConfigPrefix?: boolean): HeadersInit;
46
53
  declare const _default: {
47
54
  getConfig: () => NativeAuthConfig;
48
55
  setConfig: (newConfig: Partial<NativeAuthConfig>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ollaid/native-sso",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Package NPM fullstack pour l'authentification Native SSO Ollaid - Frontend-First",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",