vuethenticate 0.1.9 → 0.1.11
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/composables/useAuth.d.ts.map +1 -1
- package/dist/index.esm.js +54 -53
- package/dist/index.umd.js +1 -1
- package/dist/types/auth.d.ts +2 -0
- package/dist/types/auth.d.ts.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/composables/useAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,sBAAsB,EACtB,aAAa,EAChB,MAAM,eAAe,CAAC;AAmRvB;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,GAAG,OAAO,EACpC,QAAQ,UAAU,KACnB,aAAa,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/composables/useAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,sBAAsB,EACtB,aAAa,EAChB,MAAM,eAAe,CAAC;AAmRvB;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,GAAG,OAAO,EACpC,QAAQ,UAAU,KACnB,aAAa,CAAC,MAAM,CAgPtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GACzB,MAAM,GAAG,OAAO,OACf,sBAAsB,CAAC,MAAM,CAgFjC,CAAC"}
|
package/dist/index.esm.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as y, computed as N, watch as j, defineComponent as V, onMounted as z, createElementBlock as _, openBlock as W, Fragment as B, renderSlot as
|
1
|
+
import { ref as y, computed as N, watch as j, defineComponent as V, onMounted as z, createElementBlock as _, openBlock as W, Fragment as B, renderSlot as A, createCommentVNode as I, unref as M, createElementVNode as v, toDisplayString as x } from "vue";
|
2
2
|
import { WebStorageStateStore as H, Log as E, UserManager as J } from "oidc-client-ts";
|
3
3
|
var f = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = 2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = "DEBUG", e))(f || {});
|
4
4
|
const D = {
|
@@ -95,7 +95,7 @@ const te = (e) => {
|
|
95
95
|
default:
|
96
96
|
return E.NONE;
|
97
97
|
}
|
98
|
-
},
|
98
|
+
}, S = /* @__PURE__ */ new Map(), ne = (e) => {
|
99
99
|
try {
|
100
100
|
const { userManager: t, eventCallbacks: r } = e;
|
101
101
|
r.userLoaded && t.events.removeUserLoaded(r.userLoaded), r.userUnloaded && t.events.removeUserUnloaded(r.userUnloaded), r.accessTokenExpired && t.events.removeAccessTokenExpired(
|
@@ -108,19 +108,19 @@ const te = (e) => {
|
|
108
108
|
} catch (t) {
|
109
109
|
console.warn("Error during UserManager cleanup:", t);
|
110
110
|
}
|
111
|
-
}, G = (e) => `${e.authority}_${e.clientId}`, ae = () =>
|
111
|
+
}, G = (e) => `${e.authority}_${e.clientId}`, ae = () => S.size === 0 ? null : (S.size === 1 || console.warn(
|
112
112
|
"Multiple auth instances detected. Callback components may not work as expected. Consider using a single auth instance or specify config explicitly."
|
113
|
-
), Array.from(
|
114
|
-
const t = G(e), r =
|
113
|
+
), Array.from(S.values())[0] || null), le = (e) => {
|
114
|
+
const t = G(e), r = S.get(t);
|
115
115
|
if (r)
|
116
116
|
return r;
|
117
|
-
const s = se(e), n = y(!1), c = y(!1), a = y(null), l = y(!1), o = y(null), b = N(() => !!a.value && !a.value.expired),
|
117
|
+
const s = se(e), n = y(!1), c = y(!1), a = y(null), l = y(!1), o = y(null), b = N(() => !!a.value && !a.value.expired), h = N(() => {
|
118
118
|
var m;
|
119
119
|
return ((m = a.value) == null ? void 0 : m.access_token) || null;
|
120
120
|
}), i = N(() => {
|
121
121
|
var m;
|
122
122
|
return !!((m = a.value) != null && m.expired);
|
123
|
-
}),
|
123
|
+
}), g = oe(e), k = {
|
124
124
|
userManager: s,
|
125
125
|
isInitialized: n,
|
126
126
|
isInitializing: c,
|
@@ -128,12 +128,12 @@ const te = (e) => {
|
|
128
128
|
isLoading: l,
|
129
129
|
error: o,
|
130
130
|
isAuthenticated: b,
|
131
|
-
accessToken:
|
131
|
+
accessToken: h,
|
132
132
|
isExpired: i,
|
133
|
-
logger:
|
133
|
+
logger: g,
|
134
134
|
eventCallbacks: {}
|
135
135
|
};
|
136
|
-
return
|
136
|
+
return S.set(t, k), k;
|
137
137
|
}, se = (e) => {
|
138
138
|
const t = Z(e);
|
139
139
|
return new J(t);
|
@@ -183,15 +183,15 @@ const te = (e) => {
|
|
183
183
|
error: l,
|
184
184
|
isAuthenticated: o,
|
185
185
|
accessToken: b,
|
186
|
-
isExpired:
|
187
|
-
} = t, i = G(e),
|
186
|
+
isExpired: h
|
187
|
+
} = t, i = G(e), g = async () => {
|
188
188
|
if (!(n.value || s.value))
|
189
189
|
try {
|
190
190
|
n.value = !0, a.value = !0, l.value = null;
|
191
|
-
const
|
192
|
-
if (
|
193
|
-
if (!
|
194
|
-
c.value =
|
191
|
+
const d = await r.getUser();
|
192
|
+
if (d)
|
193
|
+
if (!d.expired)
|
194
|
+
c.value = d, t.logger.info(
|
195
195
|
"[Vuethenticate] useAuth: User restored from storage"
|
196
196
|
);
|
197
197
|
else if (e.automaticSilentRenew !== !1) {
|
@@ -209,12 +209,12 @@ const te = (e) => {
|
|
209
209
|
} else
|
210
210
|
await r.removeUser(), c.value = null;
|
211
211
|
s.value = !0;
|
212
|
-
} catch (
|
212
|
+
} catch (d) {
|
213
213
|
t.logger.error(
|
214
214
|
"[Vuethenticate] useAuth: Initialization failed",
|
215
|
-
|
215
|
+
d
|
216
216
|
), U(
|
217
|
-
|
217
|
+
d,
|
218
218
|
"Authentication initialization failed",
|
219
219
|
l,
|
220
220
|
e.onError
|
@@ -222,19 +222,19 @@ const te = (e) => {
|
|
222
222
|
} finally {
|
223
223
|
n.value = !1, a.value = !1;
|
224
224
|
}
|
225
|
-
}, k = async (
|
225
|
+
}, k = async (d) => {
|
226
226
|
try {
|
227
|
-
a.value = !0, l.value = null, t.logger.info("[Vuethenticate] useAuth: Starting sign-in flow"), await r.signinRedirect({ state:
|
227
|
+
a.value = !0, l.value = null, t.logger.info("[Vuethenticate] useAuth: Starting sign-in flow"), await r.signinRedirect({ state: d });
|
228
228
|
} catch (u) {
|
229
229
|
t.logger.error("[Vuethenticate] useAuth: Sign-in failed", u), U(u, "Sign in failed", l, e.onError);
|
230
230
|
} finally {
|
231
231
|
a.value = !1;
|
232
232
|
}
|
233
|
-
}, m = async (
|
233
|
+
}, m = async (d) => {
|
234
234
|
try {
|
235
235
|
a.value = !0, l.value = null, c.value = null, t.logger.info(
|
236
236
|
"[Vuethenticate] useAuth: Starting sign-out flow"
|
237
|
-
), await r.signoutRedirect({ state:
|
237
|
+
), await r.signoutRedirect({ state: d });
|
238
238
|
} catch (u) {
|
239
239
|
t.logger.error("[Vuethenticate] useAuth: Sign-out failed", u), U(u, "Sign out failed", l, e.onError);
|
240
240
|
} finally {
|
@@ -243,11 +243,11 @@ const te = (e) => {
|
|
243
243
|
}, $ = async () => {
|
244
244
|
try {
|
245
245
|
a.value = !0, l.value = null;
|
246
|
-
const
|
247
|
-
c.value =
|
248
|
-
} catch (
|
246
|
+
const d = await r.signinSilent();
|
247
|
+
c.value = d;
|
248
|
+
} catch (d) {
|
249
249
|
throw U(
|
250
|
-
|
250
|
+
d,
|
251
251
|
"Silent renewal failed",
|
252
252
|
l,
|
253
253
|
e.onError
|
@@ -257,8 +257,8 @@ const te = (e) => {
|
|
257
257
|
}
|
258
258
|
}, K = () => {
|
259
259
|
l.value = null;
|
260
|
-
}, F = (
|
261
|
-
const { userManager: C, user: L, error: Y, eventCallbacks: p } =
|
260
|
+
}, F = (d, u) => {
|
261
|
+
const { userManager: C, user: L, error: Y, eventCallbacks: p } = d;
|
262
262
|
p.userLoaded = (w) => {
|
263
263
|
var R;
|
264
264
|
L.value = w, (R = u.onUserLoaded) == null || R.call(u, w);
|
@@ -272,11 +272,11 @@ const te = (e) => {
|
|
272
272
|
var w;
|
273
273
|
(w = u.onAccessTokenExpiring) == null || w.call(u);
|
274
274
|
}, p.silentRenewError = async (w) => {
|
275
|
-
|
275
|
+
d.logger.warn("Silent renewal failed:", w);
|
276
276
|
try {
|
277
277
|
await C.removeUser(), L.value = null;
|
278
278
|
} catch (R) {
|
279
|
-
|
279
|
+
d.logger.error(
|
280
280
|
"Failed to remove user after silent renewal error:",
|
281
281
|
R
|
282
282
|
);
|
@@ -285,7 +285,7 @@ const te = (e) => {
|
|
285
285
|
w,
|
286
286
|
"Silent renewal failed",
|
287
287
|
Y,
|
288
|
-
u.
|
288
|
+
u.onSilentRenewError
|
289
289
|
);
|
290
290
|
}, C.events.addUserLoaded(p.userLoaded), C.events.addUserUnloaded(p.userUnloaded), C.events.addAccessTokenExpired(
|
291
291
|
p.accessTokenExpired
|
@@ -293,15 +293,16 @@ const te = (e) => {
|
|
293
293
|
p.accessTokenExpiring
|
294
294
|
), C.events.addSilentRenewError(p.silentRenewError);
|
295
295
|
}, q = () => {
|
296
|
-
ne(t),
|
296
|
+
ne(t), S.delete(i);
|
297
297
|
};
|
298
|
-
return !s.value && !n.value && !ue(e) ? (
|
298
|
+
return !s.value && !n.value && !ue(e) ? (g(), F(t, e)) : !s.value && !n.value && (F(t, e), s.value = !0), {
|
299
299
|
user: c,
|
300
300
|
isAuthenticated: o,
|
301
301
|
isLoading: a,
|
302
|
+
isInitialized: s,
|
302
303
|
error: l,
|
303
304
|
accessToken: b,
|
304
|
-
isExpired:
|
305
|
+
isExpired: h,
|
305
306
|
signIn: k,
|
306
307
|
signOut: m,
|
307
308
|
silentRenew: $,
|
@@ -360,17 +361,17 @@ const te = (e) => {
|
|
360
361
|
emits: ["success", "error"],
|
361
362
|
setup(e, { emit: t }) {
|
362
363
|
const r = e, s = t, { processCallback: n, isInitializing: c, logger: a } = O(), l = y(!0), o = y(null), b = async () => {
|
363
|
-
var
|
364
|
+
var h, i;
|
364
365
|
try {
|
365
366
|
a.info(
|
366
367
|
"[Vuethenticate] AuthCallback: Processing authentication callback"
|
367
368
|
);
|
368
|
-
const
|
369
|
+
const g = await n();
|
369
370
|
a.info(
|
370
371
|
"[Vuethenticate] AuthCallback: Authentication callback completed successfully"
|
371
|
-
), (
|
372
|
-
} catch (
|
373
|
-
const k =
|
372
|
+
), (h = r.onSuccess) == null || h.call(r, g.user, g.state), s("success", g.user, g.state);
|
373
|
+
} catch (g) {
|
374
|
+
const k = g instanceof Error ? g : new Error("Callback processing failed");
|
374
375
|
a.error(
|
375
376
|
"[Vuethenticate] AuthCallback: Authentication callback failed",
|
376
377
|
k
|
@@ -381,11 +382,11 @@ const te = (e) => {
|
|
381
382
|
};
|
382
383
|
return z(() => {
|
383
384
|
b();
|
384
|
-
}), (
|
385
|
-
(M(c) || l.value) && !o.value ?
|
385
|
+
}), (h, i) => (W(), _(B, null, [
|
386
|
+
(M(c) || l.value) && !o.value ? A(h.$slots, "default", { key: 0 }, () => [
|
386
387
|
i[0] || (i[0] = v("p", null, "Processing authentication...", -1))
|
387
388
|
]) : I("", !0),
|
388
|
-
o.value ?
|
389
|
+
o.value ? A(h.$slots, "error", {
|
389
390
|
key: 1,
|
390
391
|
error: o.value
|
391
392
|
}, () => [
|
@@ -405,17 +406,17 @@ const te = (e) => {
|
|
405
406
|
emits: ["success", "error"],
|
406
407
|
setup(e, { emit: t }) {
|
407
408
|
const r = e, s = t, { processLogoutCallback: n, isInitializing: c, logger: a } = O(), l = y(!0), o = y(null), b = async () => {
|
408
|
-
var
|
409
|
+
var h, i;
|
409
410
|
try {
|
410
411
|
a.info(
|
411
412
|
"[Vuethenticate] LogoutCallback: Processing logout callback"
|
412
413
|
);
|
413
|
-
const
|
414
|
+
const g = await n();
|
414
415
|
a.info(
|
415
416
|
"[Vuethenticate] LogoutCallback: Logout callback completed successfully"
|
416
|
-
), (
|
417
|
-
} catch (
|
418
|
-
const k =
|
417
|
+
), (h = r.onSuccess) == null || h.call(r, g.state), s("success", g.state);
|
418
|
+
} catch (g) {
|
419
|
+
const k = g instanceof Error ? g : new Error("Logout callback processing failed");
|
419
420
|
a.error(
|
420
421
|
"[Vuethenticate] LogoutCallback: Logout callback failed",
|
421
422
|
k
|
@@ -426,9 +427,9 @@ const te = (e) => {
|
|
426
427
|
};
|
427
428
|
return z(() => {
|
428
429
|
b();
|
429
|
-
}), (
|
430
|
+
}), (h, i) => (M(c) || l.value) && !o.value ? A(h.$slots, "default", { key: 0 }, () => [
|
430
431
|
i[0] || (i[0] = v("p", null, "Processing logout...", -1))
|
431
|
-
]) : o.value ?
|
432
|
+
]) : o.value ? A(h.$slots, "error", {
|
432
433
|
key: 1,
|
433
434
|
error: o.value
|
434
435
|
}, () => [
|
@@ -436,7 +437,7 @@ const te = (e) => {
|
|
436
437
|
i[1] || (i[1] = v("h2", null, "Logout Error", -1)),
|
437
438
|
v("p", null, x(o.value.message), 1)
|
438
439
|
])
|
439
|
-
]) :
|
440
|
+
]) : A(h.$slots, "success", { key: 2 }, () => [
|
440
441
|
i[2] || (i[2] = v("div", null, [
|
441
442
|
v("h2", null, "Logout Successful"),
|
442
443
|
v("p", null, "You have been logged out successfully.")
|
@@ -466,10 +467,10 @@ const te = (e) => {
|
|
466
467
|
return z(() => {
|
467
468
|
a();
|
468
469
|
}), (l, o) => (W(), _(B, null, [
|
469
|
-
M(s) && !c.value ?
|
470
|
+
M(s) && !c.value ? A(l.$slots, "default", { key: 0 }, () => [
|
470
471
|
o[0] || (o[0] = v("p", null, "Processing silent renewal...", -1))
|
471
472
|
]) : I("", !0),
|
472
|
-
c.value ?
|
473
|
+
c.value ? A(l.$slots, "error", {
|
473
474
|
key: 1,
|
474
475
|
error: c.value
|
475
476
|
}, () => [
|
package/dist/index.umd.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(f,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("oidc-client-ts")):typeof define=="function"&&define.amd?define(["exports","vue","oidc-client-ts"],r):(f=typeof globalThis<"u"?globalThis:f||self,r(f.Vuethenticate={},f.Vue,f.OidcClientTs))})(this,function(f,r,p){"use strict";var b=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(b||{});const V={error:(e,...t)=>console.error(e,...t),warn:(e,...t)=>console.warn(e,...t),info:(e,...t)=>console.info(e,...t),debug:(e,...t)=>console.debug(e,...t)},I={error:()=>{},warn:()=>{},info:()=>{},debug:()=>{}},x=(e,t)=>({error:t>=1?e.error:()=>{},warn:t>=2?e.warn:()=>{},info:t>=3?e.info:()=>{},debug:t>=4?e.debug:()=>{}});function $(e){const t=typeof window<"u"?window.location.origin:"";return P(e),{authority:e.authority,client_id:e.clientId,client_secret:e.clientSecret,client_authentication:e.clientAuthentication,redirect_uri:e.redirectUri??`${t}/auth/callback`,scope:e.scope??"openid profile",response_type:e.responseType??"code",userStore:e.storage?new p.WebStorageStateStore({store:F(e.storage)}):void 0,automaticSilentRenew:e.automaticSilentRenew??!0,silent_redirect_uri:e.silentRedirectUri??`${t}/auth/silent-callback`,post_logout_redirect_uri:e.postLogoutRedirectUri??`${t}/auth/logout-callback`,includeIdTokenInSilentRenew:!0,accessTokenExpiringNotificationTimeInSeconds:60}}function F(e){if(typeof window>"u")return M();switch(e){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage;case"memory":return M();default:return window.localStorage}}function M(){const e=new Map;return{getItem:t=>e.get(t)??null,setItem:(t,n)=>e.set(t,n),removeItem:t=>e.delete(t),clear:()=>e.clear(),get length(){return e.size},key:t=>Array.from(e.keys())[t]??null}}const P=e=>{if(e.logLevel===void 0&&!e.logger)return;const t=e.logger??(e.logLevel!==void 0?V:void 0),n=e.logLevel??b.NONE;t&&(p.Log.setLogger({error:t.error,warn:t.warn,info:t.info,debug:t.debug}),p.Log.setLevel(_(n)))},_=e=>{switch(e){case b.NONE:return p.Log.NONE;case b.ERROR:return p.Log.ERROR;case b.WARN:return p.Log.WARN;case b.INFO:return p.Log.INFO;case b.DEBUG:return p.Log.DEBUG;default:return p.Log.NONE}},S=new Map,B=e=>{try{const{userManager:t,eventCallbacks:n}=e;n.userLoaded&&t.events.removeUserLoaded(n.userLoaded),n.userUnloaded&&t.events.removeUserUnloaded(n.userUnloaded),n.accessTokenExpired&&t.events.removeAccessTokenExpired(n.accessTokenExpired),n.accessTokenExpiring&&t.events.removeAccessTokenExpiring(n.accessTokenExpiring),n.silentRenewError&&t.events.removeSilentRenewError(n.silentRenewError),t.stopSilentRenew(),t.clearStaleState()}catch(t){console.warn("Error during UserManager cleanup:",t)}},z=e=>`${e.authority}_${e.clientId}`,W=()=>S.size===0?null:(S.size===1||console.warn("Multiple auth instances detected. Callback components may not work as expected. Consider using a single auth instance or specify config explicitly."),Array.from(S.values())[0]||null),D=e=>{const t=z(e),n=S.get(t);if(n)return n;const s=q(e),a=r.ref(!1),d=r.ref(!1),l=r.ref(null),o=r.ref(!1),i=r.ref(null),E=r.computed(()=>!!l.value&&!l.value.expired),h=r.computed(()=>{var A;return((A=l.value)==null?void 0:A.access_token)||null}),c=r.computed(()=>{var A;return!!((A=l.value)!=null&&A.expired)}),g=G(e),w={userManager:s,isInitialized:a,isInitializing:d,user:l,isLoading:o,error:i,isAuthenticated:E,accessToken:h,isExpired:c,logger:g,eventCallbacks:{}};return S.set(t,w),w},q=e=>{const t=$(e);return new p.UserManager(t)},G=e=>{if(!e.logger&&!e.logLevel)return I;const t=e.logger??V,n=e.logLevel??b.NONE;return x(t,n)},U=(e,t,n,s)=>{const a=e instanceof Error?e:new Error(t);return n.value=a,s==null||s(a),a},K=e=>{var t,n;if(!((t=e.authority)!=null&&t.trim()))throw new Error("AuthConfig: authority is required");if(!((n=e.clientId)!=null&&n.trim()))throw new Error("AuthConfig: clientId is required");try{new URL(e.authority)}catch{throw new Error("AuthConfig: authority must be a valid URL")}},N=async(e,t=1e4)=>{if(!e.isInitialized.value)return new Promise((n,s)=>{const a=setTimeout(()=>{s(new Error("Authentication initialization timeout"))},t),d=r.watch(e.isInitialized,l=>{l&&(clearTimeout(a),d(),n())},{immediate:!0})})},j=e=>{const t=window.location.href;return!!(e.silentRedirectUri&&t.startsWith(e.silentRedirectUri)||e.redirectUri&&t.startsWith(e.redirectUri)||e.postLogoutRedirectUri&&t.startsWith(e.postLogoutRedirectUri))},Y=e=>{K(e);const t=D(e),{userManager:n,isInitialized:s,isInitializing:a,user:d,isLoading:l,error:o,isAuthenticated:i,accessToken:E,isExpired:h}=t,c=z(e),g=async()=>{if(!(a.value||s.value))try{a.value=!0,l.value=!0,o.value=null;const k=await n.getUser();if(k)if(!k.expired)d.value=k,t.logger.info("[Vuethenticate] useAuth: User restored from storage");else if(e.automaticSilentRenew!==!1){t.logger.info("[Vuethenticate] useAuth: Token expired, attempting silent renewal");try{await O()}catch(u){t.logger.warn("[Vuethenticate] useAuth: Silent renewal failed during initialization",u),await n.removeUser(),d.value=null}}else await n.removeUser(),d.value=null;s.value=!0}catch(k){t.logger.error("[Vuethenticate] useAuth: Initialization failed",k),U(k,"Authentication initialization failed",o,e.onError)}finally{a.value=!1,l.value=!1}},w=async k=>{try{l.value=!0,o.value=null,t.logger.info("[Vuethenticate] useAuth: Starting sign-in flow"),await n.signinRedirect({state:k})}catch(u){t.logger.error("[Vuethenticate] useAuth: Sign-in failed",u),U(u,"Sign in failed",o,e.onError)}finally{l.value=!1}},A=async k=>{try{l.value=!0,o.value=null,d.value=null,t.logger.info("[Vuethenticate] useAuth: Starting sign-out flow"),await n.signoutRedirect({state:k})}catch(u){t.logger.error("[Vuethenticate] useAuth: Sign-out failed",u),U(u,"Sign out failed",o,e.onError)}finally{l.value=!1}},O=async()=>{try{l.value=!0,o.value=null;const k=await n.signinSilent();d.value=k}catch(k){throw U(k,"Silent renewal failed",o,e.onError)}finally{l.value=!1}},X=()=>{o.value=null},T=(k,u)=>{const{userManager:C,user:R,error:ee,eventCallbacks:y}=k;y.userLoaded=m=>{var v;R.value=m,(v=u.onUserLoaded)==null||v.call(u,m)},y.userUnloaded=()=>{var m;R.value=null,(m=u.onUserUnloaded)==null||m.call(u)},y.accessTokenExpired=()=>{var m;(m=u.onAccessTokenExpired)==null||m.call(u)},y.accessTokenExpiring=()=>{var m;(m=u.onAccessTokenExpiring)==null||m.call(u)},y.silentRenewError=async m=>{console.warn("Silent renewal failed:",m);try{await C.removeUser(),R.value=null}catch(v){console.error("Failed to remove user after silent renewal error:",v)}U(m,"Silent renewal failed",ee,u.onError)},C.events.addUserLoaded(y.userLoaded),C.events.addUserUnloaded(y.userUnloaded),C.events.addAccessTokenExpired(y.accessTokenExpired),C.events.addAccessTokenExpiring(y.accessTokenExpiring),C.events.addSilentRenewError(y.silentRenewError)},Z=()=>{B(t),S.delete(c)};return!s.value&&!a.value&&!j(e)?(g(),T(t,e)):!s.value&&!a.value&&(T(t,e),s.value=!0),{user:d,isAuthenticated:i,isLoading:l,error:o,accessToken:E,isExpired:h,signIn:w,signOut:A,silentRenew:O,clearError:X,cleanup:Z}},L=()=>{const e=W();if(!e)throw new Error("Authentication not initialized. Make sure useAuth() is called in a parent component first.");return{processCallback:async()=>{await N(e),e.logger.info("[Vuethenticate] useAuthCallbacks: Processing authentication callback");const a=await e.userManager.signinCallback();if(!a)throw new Error("Authentication callback failed: no user returned");return e.logger.info("[Vuethenticate] useAuthCallbacks: Authentication callback successful"),{user:a,state:a.state}},processLogoutCallback:async()=>{await N(e),e.logger.debug("[Vuethenticate] useAuthCallbacks: Processing logout callback");const a=await e.userManager.signoutCallback();return e.logger.info("[Vuethenticate] useAuthCallbacks: Logout callback completed successfully"),{state:a==null?void 0:a.userState}},processSilentCallback:async()=>{await N(e),e.logger.debug("[Vuethenticate] useAuthCallbacks: Processing silent callback"),await e.userManager.signinCallback(),e.logger.debug("[Vuethenticate] useAuthCallbacks: Silent callback completed successfully")},isInitialized:e.isInitialized,isInitializing:e.isInitializing,logger:e.logger}},H=r.defineComponent({__name:"AuthCallback",props:{onSuccess:{type:Function},onError:{type:Function}},emits:["success","error"],setup(e,{emit:t}){const n=e,s=t,{processCallback:a,isInitializing:d,logger:l}=L(),o=r.ref(!0),i=r.ref(null),E=async()=>{var h,c;try{l.info("[Vuethenticate] AuthCallback: Processing authentication callback");const g=await a();l.info("[Vuethenticate] AuthCallback: Authentication callback completed successfully"),(h=n.onSuccess)==null||h.call(n,g.user,g.state),s("success",g.user,g.state)}catch(g){const w=g instanceof Error?g:new Error("Callback processing failed");l.error("[Vuethenticate] AuthCallback: Authentication callback failed",w),i.value=w,(c=n.onError)==null||c.call(n,w),s("error",w)}finally{o.value=!1}};return r.onMounted(()=>{E()}),(h,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.unref(d)||o.value)&&!i.value?r.renderSlot(h.$slots,"default",{key:0},()=>[c[0]||(c[0]=r.createElementVNode("p",null,"Processing authentication...",-1))]):r.createCommentVNode("",!0),i.value?r.renderSlot(h.$slots,"error",{key:1,error:i.value},()=>[r.createElementVNode("div",null,[c[1]||(c[1]=r.createElementVNode("h2",null,"Authentication Error",-1)),r.createElementVNode("p",null,r.toDisplayString(i.value.message),1)])]):r.createCommentVNode("",!0)],64))}}),J=r.defineComponent({__name:"LogoutCallback",props:{onSuccess:{type:Function},onError:{type:Function}},emits:["success","error"],setup(e,{emit:t}){const n=e,s=t,{processLogoutCallback:a,isInitializing:d,logger:l}=L(),o=r.ref(!0),i=r.ref(null),E=async()=>{var h,c;try{l.info("[Vuethenticate] LogoutCallback: Processing logout callback");const g=await a();l.info("[Vuethenticate] LogoutCallback: Logout callback completed successfully"),(h=n.onSuccess)==null||h.call(n,g.state),s("success",g.state)}catch(g){const w=g instanceof Error?g:new Error("Logout callback processing failed");l.error("[Vuethenticate] LogoutCallback: Logout callback failed",w),i.value=w,(c=n.onError)==null||c.call(n,w),s("error",w)}finally{o.value=!1}};return r.onMounted(()=>{E()}),(h,c)=>(r.unref(d)||o.value)&&!i.value?r.renderSlot(h.$slots,"default",{key:0},()=>[c[0]||(c[0]=r.createElementVNode("p",null,"Processing logout...",-1))]):i.value?r.renderSlot(h.$slots,"error",{key:1,error:i.value},()=>[r.createElementVNode("div",null,[c[1]||(c[1]=r.createElementVNode("h2",null,"Logout Error",-1)),r.createElementVNode("p",null,r.toDisplayString(i.value.message),1)])]):r.renderSlot(h.$slots,"success",{key:2},()=>[c[2]||(c[2]=r.createElementVNode("div",null,[r.createElementVNode("h2",null,"Logout Successful"),r.createElementVNode("p",null,"You have been logged out successfully.")],-1))])}}),Q=r.defineComponent({__name:"SilentCallback",props:{onError:{type:Function}},setup(e){const t=e,{processSilentCallback:n,isInitializing:s,logger:a}=L(),d=r.ref(null),l=async()=>{var o;try{a.debug("[Vuethenticate] SilentCallback: Processing silent callback"),await n()}catch(i){const E=i instanceof Error?i:new Error("Silent callback processing failed");a.error("[Vuethenticate] SilentCallback: Silent callback failed",E),d.value=E,(o=t.onError)==null||o.call(t,E)}};return r.onMounted(()=>{l()}),(o,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(s)&&!d.value?r.renderSlot(o.$slots,"default",{key:0},()=>[i[0]||(i[0]=r.createElementVNode("p",null,"Processing silent renewal...",-1))]):r.createCommentVNode("",!0),d.value?r.renderSlot(o.$slots,"error",{key:1,error:d.value},()=>[r.createElementVNode("p",null,"Silent renewal error: "+r.toDisplayString(d.value.message),1)]):r.createCommentVNode("",!0)],64))}});f.AuthCallback=H,f.LogLevel=b,f.LogoutCallback=J,f.SilentCallback=Q,f.consoleLogger=V,f.silentLogger=I,f.useAuth=Y,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
1
|
+
(function(f,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("oidc-client-ts")):typeof define=="function"&&define.amd?define(["exports","vue","oidc-client-ts"],r):(f=typeof globalThis<"u"?globalThis:f||self,r(f.Vuethenticate={},f.Vue,f.OidcClientTs))})(this,function(f,r,p){"use strict";var b=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(b||{});const V={error:(e,...t)=>console.error(e,...t),warn:(e,...t)=>console.warn(e,...t),info:(e,...t)=>console.info(e,...t),debug:(e,...t)=>console.debug(e,...t)},I={error:()=>{},warn:()=>{},info:()=>{},debug:()=>{}},x=(e,t)=>({error:t>=1?e.error:()=>{},warn:t>=2?e.warn:()=>{},info:t>=3?e.info:()=>{},debug:t>=4?e.debug:()=>{}});function $(e){const t=typeof window<"u"?window.location.origin:"";return P(e),{authority:e.authority,client_id:e.clientId,client_secret:e.clientSecret,client_authentication:e.clientAuthentication,redirect_uri:e.redirectUri??`${t}/auth/callback`,scope:e.scope??"openid profile",response_type:e.responseType??"code",userStore:e.storage?new p.WebStorageStateStore({store:F(e.storage)}):void 0,automaticSilentRenew:e.automaticSilentRenew??!0,silent_redirect_uri:e.silentRedirectUri??`${t}/auth/silent-callback`,post_logout_redirect_uri:e.postLogoutRedirectUri??`${t}/auth/logout-callback`,includeIdTokenInSilentRenew:!0,accessTokenExpiringNotificationTimeInSeconds:60}}function F(e){if(typeof window>"u")return M();switch(e){case"localStorage":return window.localStorage;case"sessionStorage":return window.sessionStorage;case"memory":return M();default:return window.localStorage}}function M(){const e=new Map;return{getItem:t=>e.get(t)??null,setItem:(t,n)=>e.set(t,n),removeItem:t=>e.delete(t),clear:()=>e.clear(),get length(){return e.size},key:t=>Array.from(e.keys())[t]??null}}const P=e=>{if(e.logLevel===void 0&&!e.logger)return;const t=e.logger??(e.logLevel!==void 0?V:void 0),n=e.logLevel??b.NONE;t&&(p.Log.setLogger({error:t.error,warn:t.warn,info:t.info,debug:t.debug}),p.Log.setLevel(_(n)))},_=e=>{switch(e){case b.NONE:return p.Log.NONE;case b.ERROR:return p.Log.ERROR;case b.WARN:return p.Log.WARN;case b.INFO:return p.Log.INFO;case b.DEBUG:return p.Log.DEBUG;default:return p.Log.NONE}},S=new Map,B=e=>{try{const{userManager:t,eventCallbacks:n}=e;n.userLoaded&&t.events.removeUserLoaded(n.userLoaded),n.userUnloaded&&t.events.removeUserUnloaded(n.userUnloaded),n.accessTokenExpired&&t.events.removeAccessTokenExpired(n.accessTokenExpired),n.accessTokenExpiring&&t.events.removeAccessTokenExpiring(n.accessTokenExpiring),n.silentRenewError&&t.events.removeSilentRenewError(n.silentRenewError),t.stopSilentRenew(),t.clearStaleState()}catch(t){console.warn("Error during UserManager cleanup:",t)}},z=e=>`${e.authority}_${e.clientId}`,W=()=>S.size===0?null:(S.size===1||console.warn("Multiple auth instances detected. Callback components may not work as expected. Consider using a single auth instance or specify config explicitly."),Array.from(S.values())[0]||null),D=e=>{const t=z(e),n=S.get(t);if(n)return n;const s=q(e),a=r.ref(!1),d=r.ref(!1),l=r.ref(null),o=r.ref(!1),i=r.ref(null),E=r.computed(()=>!!l.value&&!l.value.expired),k=r.computed(()=>{var A;return((A=l.value)==null?void 0:A.access_token)||null}),c=r.computed(()=>{var A;return!!((A=l.value)!=null&&A.expired)}),h=G(e),w={userManager:s,isInitialized:a,isInitializing:d,user:l,isLoading:o,error:i,isAuthenticated:E,accessToken:k,isExpired:c,logger:h,eventCallbacks:{}};return S.set(t,w),w},q=e=>{const t=$(e);return new p.UserManager(t)},G=e=>{if(!e.logger&&!e.logLevel)return I;const t=e.logger??V,n=e.logLevel??b.NONE;return x(t,n)},U=(e,t,n,s)=>{const a=e instanceof Error?e:new Error(t);return n.value=a,s==null||s(a),a},K=e=>{var t,n;if(!((t=e.authority)!=null&&t.trim()))throw new Error("AuthConfig: authority is required");if(!((n=e.clientId)!=null&&n.trim()))throw new Error("AuthConfig: clientId is required");try{new URL(e.authority)}catch{throw new Error("AuthConfig: authority must be a valid URL")}},N=async(e,t=1e4)=>{if(!e.isInitialized.value)return new Promise((n,s)=>{const a=setTimeout(()=>{s(new Error("Authentication initialization timeout"))},t),d=r.watch(e.isInitialized,l=>{l&&(clearTimeout(a),d(),n())},{immediate:!0})})},j=e=>{const t=window.location.href;return!!(e.silentRedirectUri&&t.startsWith(e.silentRedirectUri)||e.redirectUri&&t.startsWith(e.redirectUri)||e.postLogoutRedirectUri&&t.startsWith(e.postLogoutRedirectUri))},Y=e=>{K(e);const t=D(e),{userManager:n,isInitialized:s,isInitializing:a,user:d,isLoading:l,error:o,isAuthenticated:i,accessToken:E,isExpired:k}=t,c=z(e),h=async()=>{if(!(a.value||s.value))try{a.value=!0,l.value=!0,o.value=null;const g=await n.getUser();if(g)if(!g.expired)d.value=g,t.logger.info("[Vuethenticate] useAuth: User restored from storage");else if(e.automaticSilentRenew!==!1){t.logger.info("[Vuethenticate] useAuth: Token expired, attempting silent renewal");try{await O()}catch(u){t.logger.warn("[Vuethenticate] useAuth: Silent renewal failed during initialization",u),await n.removeUser(),d.value=null}}else await n.removeUser(),d.value=null;s.value=!0}catch(g){t.logger.error("[Vuethenticate] useAuth: Initialization failed",g),U(g,"Authentication initialization failed",o,e.onError)}finally{a.value=!1,l.value=!1}},w=async g=>{try{l.value=!0,o.value=null,t.logger.info("[Vuethenticate] useAuth: Starting sign-in flow"),await n.signinRedirect({state:g})}catch(u){t.logger.error("[Vuethenticate] useAuth: Sign-in failed",u),U(u,"Sign in failed",o,e.onError)}finally{l.value=!1}},A=async g=>{try{l.value=!0,o.value=null,d.value=null,t.logger.info("[Vuethenticate] useAuth: Starting sign-out flow"),await n.signoutRedirect({state:g})}catch(u){t.logger.error("[Vuethenticate] useAuth: Sign-out failed",u),U(u,"Sign out failed",o,e.onError)}finally{l.value=!1}},O=async()=>{try{l.value=!0,o.value=null;const g=await n.signinSilent();d.value=g}catch(g){throw U(g,"Silent renewal failed",o,e.onError)}finally{l.value=!1}},X=()=>{o.value=null},T=(g,u)=>{const{userManager:C,user:L,error:ee,eventCallbacks:y}=g;y.userLoaded=m=>{var v;L.value=m,(v=u.onUserLoaded)==null||v.call(u,m)},y.userUnloaded=()=>{var m;L.value=null,(m=u.onUserUnloaded)==null||m.call(u)},y.accessTokenExpired=()=>{var m;(m=u.onAccessTokenExpired)==null||m.call(u)},y.accessTokenExpiring=()=>{var m;(m=u.onAccessTokenExpiring)==null||m.call(u)},y.silentRenewError=async m=>{g.logger.warn("Silent renewal failed:",m);try{await C.removeUser(),L.value=null}catch(v){g.logger.error("Failed to remove user after silent renewal error:",v)}U(m,"Silent renewal failed",ee,u.onSilentRenewError)},C.events.addUserLoaded(y.userLoaded),C.events.addUserUnloaded(y.userUnloaded),C.events.addAccessTokenExpired(y.accessTokenExpired),C.events.addAccessTokenExpiring(y.accessTokenExpiring),C.events.addSilentRenewError(y.silentRenewError)},Z=()=>{B(t),S.delete(c)};return!s.value&&!a.value&&!j(e)?(h(),T(t,e)):!s.value&&!a.value&&(T(t,e),s.value=!0),{user:d,isAuthenticated:i,isLoading:l,isInitialized:s,error:o,accessToken:E,isExpired:k,signIn:w,signOut:A,silentRenew:O,clearError:X,cleanup:Z}},R=()=>{const e=W();if(!e)throw new Error("Authentication not initialized. Make sure useAuth() is called in a parent component first.");return{processCallback:async()=>{await N(e),e.logger.info("[Vuethenticate] useAuthCallbacks: Processing authentication callback");const a=await e.userManager.signinCallback();if(!a)throw new Error("Authentication callback failed: no user returned");return e.logger.info("[Vuethenticate] useAuthCallbacks: Authentication callback successful"),{user:a,state:a.state}},processLogoutCallback:async()=>{await N(e),e.logger.debug("[Vuethenticate] useAuthCallbacks: Processing logout callback");const a=await e.userManager.signoutCallback();return e.logger.info("[Vuethenticate] useAuthCallbacks: Logout callback completed successfully"),{state:a==null?void 0:a.userState}},processSilentCallback:async()=>{await N(e),e.logger.debug("[Vuethenticate] useAuthCallbacks: Processing silent callback"),await e.userManager.signinCallback(),e.logger.debug("[Vuethenticate] useAuthCallbacks: Silent callback completed successfully")},isInitialized:e.isInitialized,isInitializing:e.isInitializing,logger:e.logger}},H=r.defineComponent({__name:"AuthCallback",props:{onSuccess:{type:Function},onError:{type:Function}},emits:["success","error"],setup(e,{emit:t}){const n=e,s=t,{processCallback:a,isInitializing:d,logger:l}=R(),o=r.ref(!0),i=r.ref(null),E=async()=>{var k,c;try{l.info("[Vuethenticate] AuthCallback: Processing authentication callback");const h=await a();l.info("[Vuethenticate] AuthCallback: Authentication callback completed successfully"),(k=n.onSuccess)==null||k.call(n,h.user,h.state),s("success",h.user,h.state)}catch(h){const w=h instanceof Error?h:new Error("Callback processing failed");l.error("[Vuethenticate] AuthCallback: Authentication callback failed",w),i.value=w,(c=n.onError)==null||c.call(n,w),s("error",w)}finally{o.value=!1}};return r.onMounted(()=>{E()}),(k,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.unref(d)||o.value)&&!i.value?r.renderSlot(k.$slots,"default",{key:0},()=>[c[0]||(c[0]=r.createElementVNode("p",null,"Processing authentication...",-1))]):r.createCommentVNode("",!0),i.value?r.renderSlot(k.$slots,"error",{key:1,error:i.value},()=>[r.createElementVNode("div",null,[c[1]||(c[1]=r.createElementVNode("h2",null,"Authentication Error",-1)),r.createElementVNode("p",null,r.toDisplayString(i.value.message),1)])]):r.createCommentVNode("",!0)],64))}}),J=r.defineComponent({__name:"LogoutCallback",props:{onSuccess:{type:Function},onError:{type:Function}},emits:["success","error"],setup(e,{emit:t}){const n=e,s=t,{processLogoutCallback:a,isInitializing:d,logger:l}=R(),o=r.ref(!0),i=r.ref(null),E=async()=>{var k,c;try{l.info("[Vuethenticate] LogoutCallback: Processing logout callback");const h=await a();l.info("[Vuethenticate] LogoutCallback: Logout callback completed successfully"),(k=n.onSuccess)==null||k.call(n,h.state),s("success",h.state)}catch(h){const w=h instanceof Error?h:new Error("Logout callback processing failed");l.error("[Vuethenticate] LogoutCallback: Logout callback failed",w),i.value=w,(c=n.onError)==null||c.call(n,w),s("error",w)}finally{o.value=!1}};return r.onMounted(()=>{E()}),(k,c)=>(r.unref(d)||o.value)&&!i.value?r.renderSlot(k.$slots,"default",{key:0},()=>[c[0]||(c[0]=r.createElementVNode("p",null,"Processing logout...",-1))]):i.value?r.renderSlot(k.$slots,"error",{key:1,error:i.value},()=>[r.createElementVNode("div",null,[c[1]||(c[1]=r.createElementVNode("h2",null,"Logout Error",-1)),r.createElementVNode("p",null,r.toDisplayString(i.value.message),1)])]):r.renderSlot(k.$slots,"success",{key:2},()=>[c[2]||(c[2]=r.createElementVNode("div",null,[r.createElementVNode("h2",null,"Logout Successful"),r.createElementVNode("p",null,"You have been logged out successfully.")],-1))])}}),Q=r.defineComponent({__name:"SilentCallback",props:{onError:{type:Function}},setup(e){const t=e,{processSilentCallback:n,isInitializing:s,logger:a}=R(),d=r.ref(null),l=async()=>{var o;try{a.debug("[Vuethenticate] SilentCallback: Processing silent callback"),await n()}catch(i){const E=i instanceof Error?i:new Error("Silent callback processing failed");a.error("[Vuethenticate] SilentCallback: Silent callback failed",E),d.value=E,(o=t.onError)==null||o.call(t,E)}};return r.onMounted(()=>{l()}),(o,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(s)&&!d.value?r.renderSlot(o.$slots,"default",{key:0},()=>[i[0]||(i[0]=r.createElementVNode("p",null,"Processing silent renewal...",-1))]):r.createCommentVNode("",!0),d.value?r.renderSlot(o.$slots,"error",{key:1,error:d.value},()=>[r.createElementVNode("p",null,"Silent renewal error: "+r.toDisplayString(d.value.message),1)]):r.createCommentVNode("",!0)],64))}});f.AuthCallback=H,f.LogLevel=b,f.LogoutCallback=J,f.SilentCallback=Q,f.consoleLogger=V,f.silentLogger=I,f.useAuth=Y,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
package/dist/types/auth.d.ts
CHANGED
@@ -20,10 +20,12 @@ export interface AuthConfig {
|
|
20
20
|
onUserUnloaded?: () => void;
|
21
21
|
onAccessTokenExpired?: () => void;
|
22
22
|
onAccessTokenExpiring?: () => void;
|
23
|
+
onSilentRenewError?: (error: Error) => void;
|
23
24
|
}
|
24
25
|
export interface AuthState {
|
25
26
|
user: Ref<User | null>;
|
26
27
|
isLoading: Ref<boolean>;
|
28
|
+
isInitialized: Ref<boolean>;
|
27
29
|
error: Ref<Error | null>;
|
28
30
|
isAuthenticated: ComputedRef<boolean>;
|
29
31
|
accessToken: ComputedRef<string | null>;
|
package/dist/types/auth.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,UAAU;IAEvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,qBAAqB,GAAG,oBAAoB,CAAC;IAEpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,cAAc,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IACvD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,CAAC,E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