@ollaid/native-sso 1.0.3 → 1.0.6

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 CHANGED
@@ -105,9 +105,79 @@ La page `/auth/sso` gère automatiquement :
105
105
  | `logoUrl` | `string` | ❌ | URL du logo (remplace le slider) |
106
106
  | `hideFooter` | `boolean` | ❌ | Masquer "Propulsé par iam.ollaid.com" |
107
107
  | `onOnboardingComplete` | `(data: { image_url?: string; ccphone?: string; phone?: string }) => void` | ❌ | Callback après complétion de l'onboarding |
108
+ | `redirectAfterLogin` | `string` | ❌ | Route vers laquelle rediriger après connexion réussie (ex: `/client/dashboard`). Utilise `window.location.href`. Compatible avec ou sans react-router. |
109
+ | `redirectAfterLogout` | `string` | ❌ | Route vers laquelle rediriger après déconnexion (ex: `/auth/client`). Utilise `window.location.href`. |
108
110
 
109
111
  > **Note :** Le mode `debug` est contrôlé **uniquement** par le backend via la variable d'environnement `IAM_DEBUG` dans le `.env` du SaaS. Il n'y a plus de prop `debug` à passer au composant. Le `DebugPanel` est **réactif** : il apparaît automatiquement après le chargement des credentials si `debug: true` est retourné par le backend.
110
112
 
113
+ ### Redirections automatiques (optionnel)
114
+
115
+ > **Ces props sont entièrement optionnels.** Si vous ne les définissez pas,
116
+ > c'est votre backend SaaS qui gère la redirection après l'exchange — il connaît
117
+ > déjà le `accountType` et peut rediriger l'utilisateur vers la bonne page après
118
+ > avoir sauvegardé le token dans le localStorage.
119
+
120
+ Utilisez ces props uniquement si vous souhaitez que le **composant lui-même**
121
+ déclenche la redirection côté frontend :
122
+
123
+ ```tsx
124
+ <NativeSSOPage
125
+ saasApiUrl="https://votre-saas.com/api"
126
+ iamApiUrl="https://identityam.ollaid.com/api"
127
+ configPrefix="iam_client"
128
+ accountType="client"
129
+ redirectAfterLogin="/client/dashboard"
130
+ redirectAfterLogout="/auth/client"
131
+ />
132
+ ```
133
+
134
+ **Sans ces props** (usage minimal, le SaaS gère la redirection) :
135
+
136
+ ```tsx
137
+ <NativeSSOPage
138
+ saasApiUrl="https://votre-saas.com/api"
139
+ iamApiUrl="https://identityam.ollaid.com/api"
140
+ configPrefix="iam_client"
141
+ accountType="client"
142
+ onLoginSuccess={(token, user) => { /* votre logique */ }}
143
+ />
144
+ ```
145
+
146
+ **Comportement :**
147
+ - Si `redirectAfterLogin` est défini → redirection via `window.location.href` après connexion
148
+ - Si `onLoginSuccess` est aussi défini → le callback est appelé **avant** la redirection
149
+ - Si **aucun** prop de redirection n'est défini → aucune redirection automatique, comportement inchangé
150
+
151
+ ---
152
+
153
+ ## Déconnexion externe (sans le composant)
154
+
155
+ Quand l'utilisateur se déconnecte **depuis votre SaaS** (ex : bouton logout dans le backoffice), le composant `NativeSSOPage` n'est pas impliqué. Vous devez donc nettoyer manuellement la session SSO pour éviter que le package considère l'utilisateur comme encore connecté.
156
+
157
+ ### Utilisation
158
+
159
+ ```tsx
160
+ import { clearAuthToken } from '@ollaid/native-sso';
161
+
162
+ const handleLogout = async () => {
163
+ await revokeBackendToken(); // votre logique SaaS (révocation Sanctum, etc.)
164
+ clearAuthToken(); // nettoie les 5 clés localStorage du package
165
+ navigate('/auth/login');
166
+ };
167
+ ```
168
+
169
+ ### Clés localStorage nettoyées par `clearAuthToken()`
170
+
171
+ | Clé | Description |
172
+ |-----|-------------|
173
+ | `auth_token` | Token Sanctum actif |
174
+ | `token` | Token legacy |
175
+ | `user` | Objet utilisateur (avec `iam_reference`, `alias_reference`) |
176
+ | `account_type` | Type de compte (`user` ou `client`) |
177
+ | `alias_reference` | Référence de l'alias de connexion |
178
+
179
+ > **Important :** Si vous ne nettoyez pas ces clés, l'utilisateur verra l'écran "Déconnexion" au lieu du formulaire de connexion en revenant sur la page SSO.
180
+
111
181
  ---
112
182
 
113
183
  ## Multi-Tenant (plusieurs applications sur le même backend)
@@ -136,6 +206,8 @@ Backend SaaS:
136
206
  iamApiUrl="https://identityam.ollaid.com/api"
137
207
  configPrefix="iam"
138
208
  accountType="user"
209
+ redirectAfterLogin="/dashboard"
210
+ redirectAfterLogout="/auth/sso"
139
211
  />
140
212
 
141
213
  {/* Page login espace vendeur */}
@@ -144,6 +216,8 @@ Backend SaaS:
144
216
  iamApiUrl="https://identityam.ollaid.com/api"
145
217
  configPrefix="iam_vendor"
146
218
  accountType="client"
219
+ redirectAfterLogin="/vendor/dashboard"
220
+ redirectAfterLogout="/auth/vendor"
147
221
  />
148
222
 
149
223
  {/* Page login admin — même backend, app IAM différente */}
@@ -152,6 +226,8 @@ Backend SaaS:
152
226
  iamApiUrl="https://identityam.ollaid.com/api"
153
227
  configPrefix="iam_admin"
154
228
  accountType="user"
229
+ redirectAfterLogin="/admin/dashboard"
230
+ redirectAfterLogout="/auth/admin"
155
231
  />
156
232
  ```
157
233
 
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Apps Logo Slider for @ollaid/native-sso
3
+ * Matches Web SSO badge style: horizontal marquee, small icons, no app names
3
4
  */
4
5
  interface AppsLogoSliderProps {
5
6
  speed?: 'slow' | 'normal' | 'fast';
6
7
  className?: string;
7
8
  iamApiUrl?: string;
8
9
  }
9
- export declare function AppsLogoSlider({ speed, className, iamApiUrl: iamApiUrlProp }: AppsLogoSliderProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export declare function AppsLogoSlider({ className, iamApiUrl: iamApiUrlProp }: AppsLogoSliderProps): import("react/jsx-runtime").JSX.Element | null;
10
11
  export default AppsLogoSlider;
@@ -2,39 +2,27 @@
2
2
  * NativeSSOPage — Page autonome complète pour @ollaid/native-sso
3
3
  * Design aligné sur /sso/auth (fond primary, card blanche, ShieldCheck branding)
4
4
  *
5
- * @version 1.0.0
5
+ * @version 2.0.0
6
6
  */
7
7
  import type { UserInfos } from '../types/native';
8
8
  export interface NativeSSOPageProps {
9
- /** URL du Backend SaaS */
10
9
  saasApiUrl: string;
11
- /** URL du Backend IAM */
12
10
  iamApiUrl: string;
13
- /** Callback après login/signup réussi — reçoit le token et l'utilisateur */
14
11
  onLoginSuccess?: (token: string, user: UserInfos) => void;
15
- /** Callback après logout */
16
12
  onLogout?: () => void;
17
- /** Callback quand l'utilisateur complète l'onboarding (photo/phone) */
18
13
  onOnboardingComplete?: (data: {
19
14
  image_url?: string;
20
15
  ccphone?: string;
21
16
  phone?: string;
22
17
  }) => void;
23
- /** Type de compte à persister dans localStorage (défaut: 'user') */
24
18
  accountType?: 'user' | 'client';
25
- /**
26
- * Préfixe de configuration IAM côté backend (défaut: 'iam').
27
- * Permet le multi-tenant : 'iam', 'iam_vendor', 'iam_client', 'iam_admin', etc.
28
- */
29
19
  configPrefix?: string;
30
- /** Titre personnalisé */
31
20
  title?: string;
32
- /** Description personnalisée */
33
21
  description?: string;
34
- /** Logo URL personnalisé */
35
22
  logoUrl?: string;
36
- /** Masquer le footer "Propulsé par" */
37
23
  hideFooter?: boolean;
24
+ redirectAfterLogin?: string;
25
+ redirectAfterLogout?: string;
38
26
  }
39
- export declare function NativeSSOPage({ saasApiUrl, iamApiUrl, onLoginSuccess, onLogout, onOnboardingComplete, accountType, configPrefix, title, description, logoUrl, hideFooter, }: NativeSSOPageProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function NativeSSOPage({ saasApiUrl, iamApiUrl, onLoginSuccess, onLogout, onOnboardingComplete, accountType, configPrefix, title, description, logoUrl, hideFooter, redirectAfterLogin, redirectAfterLogout, }: NativeSSOPageProps): import("react/jsx-runtime").JSX.Element;
40
28
  export default NativeSSOPage;
package/dist/index.cjs CHANGED
@@ -2954,12 +2954,9 @@ function PhoneInput({
2954
2954
  ] })
2955
2955
  ] });
2956
2956
  }
2957
- function AppsLogoSlider({ speed = "normal", className = "", iamApiUrl: iamApiUrlProp }) {
2958
- const scrollRef = react.useRef(null);
2959
- const [isPaused, setIsPaused] = react.useState(false);
2957
+ function AppsLogoSlider({ className = "", iamApiUrl: iamApiUrlProp }) {
2960
2958
  const [applications, setApplications] = react.useState([]);
2961
2959
  const [isLoading, setIsLoading] = react.useState(true);
2962
- const speedMap = { slow: 50, normal: 30, fast: 15 };
2963
2960
  react.useEffect(() => {
2964
2961
  const resolvedIamApiUrl = iamApiUrlProp || getNativeAuthConfig().iamApiUrl;
2965
2962
  if (!resolvedIamApiUrl) return;
@@ -2978,19 +2975,6 @@ function AppsLogoSlider({ speed = "normal", className = "", iamApiUrl: iamApiUrl
2978
2975
  };
2979
2976
  fetchApps();
2980
2977
  }, [iamApiUrlProp]);
2981
- react.useEffect(() => {
2982
- const container = scrollRef.current;
2983
- if (!container || applications.length === 0) return;
2984
- let pos = 0;
2985
- const id = setInterval(() => {
2986
- if (!isPaused && container) {
2987
- pos += 1;
2988
- if (pos >= container.scrollWidth / 2) pos = 0;
2989
- container.scrollLeft = pos;
2990
- }
2991
- }, speedMap[speed]);
2992
- return () => clearInterval(id);
2993
- }, [isPaused, speed, applications.length]);
2994
2978
  const getLogoUrl = (logo) => {
2995
2979
  if (!logo) return null;
2996
2980
  if (logo.startsWith("http")) return logo;
@@ -2998,27 +2982,85 @@ function AppsLogoSlider({ speed = "normal", className = "", iamApiUrl: iamApiUrl
2998
2982
  return `${resolvedUrl.replace("/api", "")}/storage/applications/${logo}`;
2999
2983
  };
3000
2984
  if (isLoading) {
3001
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "1rem", padding: "0.5rem 0" }, children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flexShrink: 0, display: "flex", flexDirection: "column", alignItems: "center", gap: "0.5rem" }, children: [
3002
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "3rem", height: "3rem", borderRadius: "0.75rem", backgroundColor: "#e5e7eb" } }),
3003
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "2.5rem", height: "0.75rem", borderRadius: "0.25rem", backgroundColor: "#e5e7eb" } })
3004
- ] }, i)) }) });
2985
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "0.75rem", padding: "0 0.75rem" }, children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "2rem", height: "2rem", borderRadius: "0.5rem", backgroundColor: "#e5e7eb", flexShrink: 0 } }, i)) }) });
3005
2986
  }
3006
2987
  if (applications.length === 0) return null;
3007
- const displayApps = [...applications, ...applications];
3008
- return /* @__PURE__ */ jsxRuntime.jsx(
2988
+ const displayApps = [...applications, ...applications, ...applications];
2989
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3009
2990
  "div",
3010
2991
  {
3011
2992
  className,
3012
- style: { position: "relative", overflow: "hidden" },
3013
- onMouseEnter: () => setIsPaused(true),
3014
- onMouseLeave: () => setIsPaused(false),
3015
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollRef, style: { display: "flex", gap: "1rem", overflow: "hidden", padding: "0.5rem 0" }, children: displayApps.map((app, index) => {
3016
- const logoUrl = getLogoUrl(app.logo);
3017
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flexShrink: 0, display: "flex", flexDirection: "column", alignItems: "center", gap: "0.5rem" }, children: [
3018
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "3rem", height: "3rem", borderRadius: "0.75rem", display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "0 1px 3px rgba(0,0,0,0.1)", backgroundColor: "white", border: "1px solid #f3f4f6" }, children: logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: app.name, style: { width: "2.5rem", height: "2.5rem", objectFit: "contain", borderRadius: "0.5rem" } }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 700, fontSize: "1.125rem", color: "hsl(var(--primary, 222 47% 11%))" }, children: app.name.charAt(0).toUpperCase() }) }),
3019
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.75rem", color: "#6b7280", fontWeight: 500 }, children: app.name })
3020
- ] }, `${app.id}-${index}`);
3021
- }) })
2993
+ style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" },
2994
+ children: [
2995
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
2996
+ position: "absolute",
2997
+ left: 0,
2998
+ top: 0,
2999
+ bottom: 0,
3000
+ width: "1.5rem",
3001
+ background: "linear-gradient(to right, #ffffff, transparent)",
3002
+ zIndex: 10,
3003
+ pointerEvents: "none"
3004
+ } }),
3005
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
3006
+ display: "flex",
3007
+ animation: "ollaid-marquee 20s linear infinite",
3008
+ height: "100%",
3009
+ alignItems: "center"
3010
+ }, children: displayApps.map((app, index) => {
3011
+ var _a, _b;
3012
+ const logoUrl = getLogoUrl(app.logo);
3013
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3014
+ "div",
3015
+ {
3016
+ style: { flexShrink: 0, padding: "0 0.75rem", display: "flex", alignItems: "center", height: "100%" },
3017
+ children: [
3018
+ logoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
3019
+ "img",
3020
+ {
3021
+ src: logoUrl,
3022
+ alt: app.name,
3023
+ style: { width: "2rem", height: "2rem", objectFit: "contain" },
3024
+ onError: (e) => {
3025
+ const target = e.currentTarget;
3026
+ target.style.display = "none";
3027
+ if (target.nextElementSibling) {
3028
+ target.nextElementSibling.style.display = "flex";
3029
+ }
3030
+ }
3031
+ }
3032
+ ) : null,
3033
+ /* @__PURE__ */ jsxRuntime.jsx(
3034
+ "div",
3035
+ {
3036
+ style: {
3037
+ width: "2rem",
3038
+ height: "2rem",
3039
+ borderRadius: "0.5rem",
3040
+ backgroundColor: "#f3f4f6",
3041
+ alignItems: "center",
3042
+ justifyContent: "center",
3043
+ display: logoUrl ? "none" : "flex"
3044
+ },
3045
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.75rem", fontWeight: 700, color: "#6b7280" }, children: ((_b = (_a = app.name) == null ? void 0 : _a.charAt(0)) == null ? void 0 : _b.toUpperCase()) || "A" })
3046
+ }
3047
+ )
3048
+ ]
3049
+ },
3050
+ `${app.id}-${index}`
3051
+ );
3052
+ }) }),
3053
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
3054
+ position: "absolute",
3055
+ right: 0,
3056
+ top: 0,
3057
+ bottom: 0,
3058
+ width: "1.5rem",
3059
+ background: "linear-gradient(to left, #ffffff, transparent)",
3060
+ zIndex: 10,
3061
+ pointerEvents: "none"
3062
+ } })
3063
+ ]
3022
3064
  }
3023
3065
  );
3024
3066
  }
@@ -4101,8 +4143,10 @@ function DebugPanel({ saasApiUrl, iamApiUrl }) {
4101
4143
  ] })
4102
4144
  ] });
4103
4145
  }
4146
+ const ollaidLogo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAr4AAADmCAYAAAAzxYbGAAAAAXNSR0IB2cksfwAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+kLEQ4cAxcKwOwAACAASURBVHja7d0/dxNH28fx33BoXNm+34Ad5wXg53D3VnygxilIa6UhZZQKOpYOqiglbiLaUNymhuPIfTgxLyBEfgPBrlzOU2iUKEaS9Wd3r5nZ7+ccThJia1ez8+eaa2dnJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACYwnvf8d5vUxIAAADIOejd8N5feO97lAaA6xxFYNpB70rakNQKf7Ud/nScc2clfX5XUj/8VV/SRRmfDQCR9quFpKfhP79wzg0oFQCovzNuhdtvx977Mz9bq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cO+fclxquBS7jobN3MzqmowzLfeJykvDWqGV2BzialNlYdLeBsev6RCU8iBU+7z/h896v+Fmllo2xjxruwMAWejXXScPvsFA7KLOPLbMMV/wuJtew7PEqqroV40n5/TUvYDXP3MlVQTEAAIARMr4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBh/w9xVszPckpDoQAAAABJRU5ErkJggg==";
4104
4147
  const COLORS = {
4105
4148
  primary: "#002147",
4149
+ primaryForeground: "#ffffff",
4106
4150
  accent: "#e8430a",
4107
4151
  card: "#ffffff",
4108
4152
  cardForeground: "#1a2332",
@@ -4131,13 +4175,49 @@ const LIGHT_VARS = {
4131
4175
  "--input": "40 15% 88%",
4132
4176
  "--ring": "209 100% 13%"
4133
4177
  };
4134
- const ShieldCheckIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: COLORS.accent, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4178
+ const ShieldCheckIcon = ({ size = 24, color = COLORS.accent }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
4135
4179
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }),
4136
4180
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 12 2 2 4-4" })
4137
4181
  ] });
4138
4182
  function needsOnboarding(user) {
4139
4183
  return !user.image_url || !user.phone;
4140
4184
  }
4185
+ const GRADIENT_STYLE_ID = "ollaid-sso-gradient-anim";
4186
+ function injectGradientAnimation() {
4187
+ if (document.getElementById(GRADIENT_STYLE_ID)) return;
4188
+ const style = document.createElement("style");
4189
+ style.id = GRADIENT_STYLE_ID;
4190
+ style.textContent = `
4191
+ @keyframes ollaid-border-gradient {
4192
+ 0% { background-position: 0% 50%; }
4193
+ 50% { background-position: 100% 50%; }
4194
+ 100% { background-position: 0% 50%; }
4195
+ }
4196
+ @keyframes ollaid-marquee {
4197
+ 0% { transform: translateX(0); }
4198
+ 100% { transform: translateX(-50%); }
4199
+ }
4200
+ `;
4201
+ document.head.appendChild(style);
4202
+ }
4203
+ const TopBranding = ({ subtitle }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "center", marginBottom: "1.5rem" }, children: [
4204
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", gap: "0.5rem", marginBottom: "0.5rem" }, children: [
4205
+ /* @__PURE__ */ jsxRuntime.jsx(ShieldCheckIcon, { size: 28, color: COLORS.accent }),
4206
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "1.25rem", fontWeight: 700, color: COLORS.primaryForeground }, children: [
4207
+ "iam.",
4208
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: COLORS.accent }, children: "ollaid" }),
4209
+ ".com"
4210
+ ] })
4211
+ ] }),
4212
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "1rem", fontWeight: 600, color: "rgba(255,255,255,0.85)" }, children: subtitle })
4213
+ ] });
4214
+ const Footer = ({ hideFooter }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: [
4215
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: ollaidLogo, alt: "Ollaid", style: { height: "28px", margin: "0 auto 0.5rem" } }),
4216
+ !hideFooter && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: { fontSize: "0.75rem", color: "rgba(255,255,255,0.5)" }, children: [
4217
+ "© 2026 iam.ollaid.com propulsé par ",
4218
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: "ollaid" })
4219
+ ] })
4220
+ ] });
4141
4221
  function NativeSSOPage({
4142
4222
  saasApiUrl,
4143
4223
  iamApiUrl,
@@ -4146,10 +4226,12 @@ function NativeSSOPage({
4146
4226
  onOnboardingComplete,
4147
4227
  accountType = "user",
4148
4228
  configPrefix = "iam",
4149
- title = "Un compte, plusieurs accès",
4229
+ title = "Un compte pour toutes vos applications",
4150
4230
  description = "Connectez-vous avec votre compte Ollaid pour accéder à toutes les applications partenaires.",
4151
4231
  logoUrl,
4152
- hideFooter = false
4232
+ hideFooter = false,
4233
+ redirectAfterLogin,
4234
+ redirectAfterLogout
4153
4235
  }) {
4154
4236
  const [modal, setModal] = react.useState("none");
4155
4237
  const [showOnboarding, setShowOnboarding] = react.useState(false);
@@ -4165,6 +4247,7 @@ function NativeSSOPage({
4165
4247
  });
4166
4248
  const { isDebug: resolvedDebug } = useNativeAuth({ saasApiUrl, iamApiUrl, configPrefix, autoLoadCredentials: true });
4167
4249
  react.useEffect(() => {
4250
+ injectGradientAnimation();
4168
4251
  const root = document.documentElement;
4169
4252
  const originalValues = {};
4170
4253
  Object.keys(LIGHT_VARS).forEach((key) => {
@@ -4218,8 +4301,9 @@ function NativeSSOPage({
4218
4301
  } else {
4219
4302
  setSession({ token, user: userObj });
4220
4303
  onLoginSuccess == null ? void 0 : onLoginSuccess(token, user);
4304
+ if (redirectAfterLogin) window.location.href = redirectAfterLogin;
4221
4305
  }
4222
- }, [onLoginSuccess]);
4306
+ }, [onLoginSuccess, redirectAfterLogin]);
4223
4307
  const handleOnboardingComplete = react.useCallback((data) => {
4224
4308
  if (!pendingSession) return;
4225
4309
  const updatedUser = { ...pendingSession.user, ...data };
@@ -4229,14 +4313,16 @@ function NativeSSOPage({
4229
4313
  setPendingSession(null);
4230
4314
  onOnboardingComplete == null ? void 0 : onOnboardingComplete(data);
4231
4315
  onLoginSuccess == null ? void 0 : onLoginSuccess(pendingSession.token, updatedUser);
4232
- }, [pendingSession, onLoginSuccess, onOnboardingComplete]);
4316
+ if (redirectAfterLogin) window.location.href = redirectAfterLogin;
4317
+ }, [pendingSession, onLoginSuccess, onOnboardingComplete, redirectAfterLogin]);
4233
4318
  const handleOnboardingSkip = react.useCallback(() => {
4234
4319
  if (!pendingSession) return;
4235
4320
  setShowOnboarding(false);
4236
4321
  setSession(pendingSession);
4237
4322
  setPendingSession(null);
4238
4323
  onLoginSuccess == null ? void 0 : onLoginSuccess(pendingSession.token, pendingSession.user);
4239
- }, [pendingSession, onLoginSuccess]);
4324
+ if (redirectAfterLogin) window.location.href = redirectAfterLogin;
4325
+ }, [pendingSession, onLoginSuccess, redirectAfterLogin]);
4240
4326
  const handleLogout = react.useCallback(() => {
4241
4327
  localStorage.removeItem(STORAGE.AUTH_TOKEN);
4242
4328
  localStorage.removeItem(STORAGE.TOKEN);
@@ -4245,7 +4331,8 @@ function NativeSSOPage({
4245
4331
  localStorage.removeItem(STORAGE.ALIAS_REFERENCE);
4246
4332
  setSession(null);
4247
4333
  onLogout == null ? void 0 : onLogout();
4248
- }, [onLogout]);
4334
+ if (redirectAfterLogout) window.location.href = redirectAfterLogout;
4335
+ }, [onLogout, redirectAfterLogout]);
4249
4336
  const containerStyle = {
4250
4337
  minHeight: "100vh",
4251
4338
  backgroundColor: COLORS.primary,
@@ -4253,7 +4340,7 @@ function NativeSSOPage({
4253
4340
  flexDirection: "column",
4254
4341
  alignItems: "center",
4255
4342
  justifyContent: "center",
4256
- padding: "1rem"
4343
+ padding: "1.5rem 1rem"
4257
4344
  };
4258
4345
  const cardStyle = {
4259
4346
  width: "100%",
@@ -4264,25 +4351,40 @@ function NativeSSOPage({
4264
4351
  boxShadow: COLORS.shadow,
4265
4352
  overflow: "hidden"
4266
4353
  };
4267
- const footerStyle = {
4268
- marginTop: "1.5rem",
4269
- fontSize: "0.75rem",
4270
- color: "rgba(255,255,255,0.6)",
4271
- textAlign: "center"
4272
- };
4273
- const BrandingHeader = () => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", marginBottom: "1.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", gap: "0.5rem", marginBottom: "0.5rem" }, children: [
4274
- /* @__PURE__ */ jsxRuntime.jsx(ShieldCheckIcon, {}),
4275
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "1.125rem", fontWeight: 700, color: COLORS.primary }, children: [
4276
- "iam.",
4277
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: COLORS.accent }, children: "ollaid" }),
4278
- ".com"
4279
- ] })
4354
+ const SliderBadge = () => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", maxWidth: "28rem", marginBottom: "1.5rem" }, children: logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: "Logo", style: { height: "3rem", margin: "0 auto" } }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
4355
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
4356
+ width: "3rem",
4357
+ height: "3rem",
4358
+ borderRadius: "50%",
4359
+ backgroundColor: "#ffffff",
4360
+ display: "flex",
4361
+ alignItems: "center",
4362
+ justifyContent: "center",
4363
+ flexShrink: 0,
4364
+ boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
4365
+ border: `1px solid ${COLORS.border}`
4366
+ }, children: /* @__PURE__ */ jsxRuntime.jsx(ShieldCheckIcon, { size: 22, color: COLORS.accent }) }),
4367
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
4368
+ flex: 1,
4369
+ minWidth: 0,
4370
+ position: "relative",
4371
+ borderRadius: "9999px",
4372
+ padding: "2px",
4373
+ background: `linear-gradient(90deg, ${COLORS.primary}, ${COLORS.accent}, ${COLORS.primary})`,
4374
+ backgroundSize: "200% 100%",
4375
+ animation: "ollaid-border-gradient 3s ease infinite"
4376
+ }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
4377
+ backgroundColor: "#ffffff",
4378
+ borderRadius: "9999px",
4379
+ height: "3rem",
4380
+ overflow: "hidden"
4381
+ }, children: /* @__PURE__ */ jsxRuntime.jsx(AppsLogoSlider, { iamApiUrl, speed: "normal" }) }) })
4280
4382
  ] }) });
4281
4383
  if (session) {
4282
4384
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle, children: [
4283
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", maxWidth: "28rem", marginBottom: "1.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(AppsLogoSlider, { iamApiUrl }) }),
4385
+ /* @__PURE__ */ jsxRuntime.jsx(TopBranding, { subtitle: title }),
4386
+ /* @__PURE__ */ jsxRuntime.jsx(SliderBadge, {}),
4284
4387
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: cardStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "2rem 1.5rem 1.5rem" }, children: [
4285
- /* @__PURE__ */ jsxRuntime.jsx(BrandingHeader, {}),
4286
4388
  /* @__PURE__ */ jsxRuntime.jsxs("h2", { style: { fontSize: "1.25rem", fontWeight: 600, textAlign: "center", color: COLORS.cardForeground }, children: [
4287
4389
  "Bienvenue, ",
4288
4390
  session.user.name
@@ -4290,20 +4392,13 @@ function NativeSSOPage({
4290
4392
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.875rem", color: COLORS.muted, textAlign: "center", marginTop: "0.25rem" }, children: "Vous êtes connecté à votre compte Ollaid SSO" }),
4291
4393
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: "1.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", onClick: handleLogout, style: { width: "100%" }, children: "Déconnexion" }) })
4292
4394
  ] }) }),
4293
- !hideFooter && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: footerStyle, children: [
4294
- "Géré par",
4295
- " ",
4296
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://iam.ollaid.com", target: "_blank", rel: "noopener noreferrer", style: { color: COLORS.accent, textDecoration: "none" }, children: "iam.ollaid.com" }),
4297
- " ",
4298
- "— Identity Access Manager"
4299
- ] })
4395
+ /* @__PURE__ */ jsxRuntime.jsx(Footer, { hideFooter })
4300
4396
  ] });
4301
4397
  }
4302
4398
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle, children: [
4303
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", maxWidth: "28rem", marginBottom: "1.5rem" }, children: logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: "Logo", style: { height: "3rem", margin: "0 auto" } }) : /* @__PURE__ */ jsxRuntime.jsx(AppsLogoSlider, { iamApiUrl }) }),
4399
+ /* @__PURE__ */ jsxRuntime.jsx(TopBranding, { subtitle: title }),
4400
+ /* @__PURE__ */ jsxRuntime.jsx(SliderBadge, {}),
4304
4401
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: cardStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "2rem 1.5rem 1.5rem" }, children: [
4305
- /* @__PURE__ */ jsxRuntime.jsx(BrandingHeader, {}),
4306
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { fontSize: "1.25rem", fontWeight: 600, textAlign: "center", color: COLORS.cardForeground, marginBottom: "0.5rem" }, children: title }),
4307
4402
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.875rem", color: COLORS.muted, textAlign: "center", marginBottom: "1.5rem" }, children: description }),
4308
4403
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
4309
4404
  /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: openLogin, style: { width: "100%", height: "2.75rem" }, children: "Connexion" }),
@@ -4312,24 +4407,13 @@ function NativeSSOPage({
4312
4407
  {
4313
4408
  variant: "outline",
4314
4409
  onClick: openSignup,
4315
- style: {
4316
- width: "100%",
4317
- height: "2.75rem",
4318
- borderColor: COLORS.cardForeground,
4319
- color: COLORS.cardForeground
4320
- },
4410
+ style: { width: "100%", height: "2.75rem", borderColor: COLORS.cardForeground, color: COLORS.cardForeground },
4321
4411
  children: "Inscription"
4322
4412
  }
4323
4413
  )
4324
4414
  ] })
4325
4415
  ] }) }),
4326
- !hideFooter && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: footerStyle, children: [
4327
- "Géré par",
4328
- " ",
4329
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://iam.ollaid.com", target: "_blank", rel: "noopener noreferrer", style: { color: COLORS.accent, textDecoration: "none" }, children: "iam.ollaid.com" }),
4330
- " ",
4331
- "— Identity Access Manager"
4332
- ] }),
4416
+ /* @__PURE__ */ jsxRuntime.jsx(Footer, { hideFooter }),
4333
4417
  /* @__PURE__ */ jsxRuntime.jsx(
4334
4418
  LoginModal,
4335
4419
  {
@@ -4548,6 +4632,7 @@ exports.OnboardingModal = OnboardingModal;
4548
4632
  exports.PasswordRecoveryModal = PasswordRecoveryModal;
4549
4633
  exports.PhoneInput = PhoneInput;
4550
4634
  exports.SignupModal = SignupModal;
4635
+ exports.clearAuthToken = clearAuthToken;
4551
4636
  exports.getAccountType = getAccountType;
4552
4637
  exports.getAuthToken = getAuthToken;
4553
4638
  exports.getAuthUser = getAuthUser;