@springmicro/auth 0.1.3 → 0.1.8
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/index.d.ts +0 -3
- package/dist/index.js +21 -657
- package/dist/index.umd.cjs +1 -30
- package/package.json +2 -2
- package/src/index.tsx +1 -5
- package/tsconfig.json +0 -1
- package/src/App.css +0 -42
- package/src/App.tsx +0 -35
- package/src/assets/react.svg +0 -1
- package/src/index.css +0 -68
- package/src/main.tsx +0 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FullAuthConfig } from 'auth-astro/src/config';
|
|
2
|
-
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
2
|
|
|
4
3
|
declare type AuthConfig = {
|
|
5
4
|
casdoorEndpoint: string;
|
|
@@ -17,6 +16,4 @@ declare type AuthConfig = {
|
|
|
17
16
|
*/
|
|
18
17
|
export declare const getAuthConfig: ({ casdoorEndpoint, clientId, clientSecret, }: AuthConfig) => FullAuthConfig;
|
|
19
18
|
|
|
20
|
-
export declare const Test: () => JSX_2.Element;
|
|
21
|
-
|
|
22
19
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,663 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var Oe;
|
|
14
|
-
function cr() {
|
|
15
|
-
if (Oe)
|
|
16
|
-
return W;
|
|
17
|
-
Oe = 1;
|
|
18
|
-
var x = Ce, _ = Symbol.for("react.element"), k = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, y = x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
-
function D(R, d, C) {
|
|
20
|
-
var g, E = {}, T = null, Y = null;
|
|
21
|
-
C !== void 0 && (T = "" + C), d.key !== void 0 && (T = "" + d.key), d.ref !== void 0 && (Y = d.ref);
|
|
22
|
-
for (g in d)
|
|
23
|
-
s.call(d, g) && !b.hasOwnProperty(g) && (E[g] = d[g]);
|
|
24
|
-
if (R && R.defaultProps)
|
|
25
|
-
for (g in d = R.defaultProps, d)
|
|
26
|
-
E[g] === void 0 && (E[g] = d[g]);
|
|
27
|
-
return { $$typeof: _, type: R, key: T, ref: Y, props: E, _owner: y.current };
|
|
28
|
-
}
|
|
29
|
-
return W.Fragment = k, W.jsx = D, W.jsxs = D, W;
|
|
30
|
-
}
|
|
31
|
-
var $ = {};
|
|
32
|
-
/**
|
|
33
|
-
* @license React
|
|
34
|
-
* react-jsx-runtime.development.js
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
-
*
|
|
38
|
-
* This source code is licensed under the MIT license found in the
|
|
39
|
-
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/
|
|
41
|
-
var Se;
|
|
42
|
-
function dr() {
|
|
43
|
-
return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
-
var x = Ce, _ = Symbol.for("react.element"), k = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), D = Symbol.for("react.provider"), R = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, we = "@@iterator";
|
|
45
|
-
function Pe(e) {
|
|
46
|
-
if (e === null || typeof e != "object")
|
|
47
|
-
return null;
|
|
48
|
-
var r = Q && e[Q] || e[we];
|
|
49
|
-
return typeof r == "function" ? r : null;
|
|
50
|
-
}
|
|
51
|
-
var w = x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52
|
-
function c(e) {
|
|
53
|
-
{
|
|
54
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
55
|
-
t[n - 1] = arguments[n];
|
|
56
|
-
je("error", e, t);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function je(e, r, t) {
|
|
60
|
-
{
|
|
61
|
-
var n = w.ReactDebugCurrentFrame, o = n.getStackAddendum();
|
|
62
|
-
o !== "" && (r += "%s", t = t.concat([o]));
|
|
63
|
-
var u = t.map(function(i) {
|
|
64
|
-
return String(i);
|
|
65
|
-
});
|
|
66
|
-
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
var xe = !1, ke = !1, De = !1, Ae = !1, Fe = !1, ee;
|
|
70
|
-
ee = Symbol.for("react.module.reference");
|
|
71
|
-
function Ie(e) {
|
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Fe || e === y || e === C || e === g || Ae || e === Y || xe || ke || De || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === E || e.$$typeof === D || e.$$typeof === R || e.$$typeof === d || // This needs to include all possible module reference object
|
|
73
|
-
// types supported by any Flight configuration anywhere since
|
|
74
|
-
// we don't know which Flight build this will end up being used
|
|
75
|
-
// with.
|
|
76
|
-
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
77
|
-
}
|
|
78
|
-
function We(e, r, t) {
|
|
79
|
-
var n = e.displayName;
|
|
80
|
-
if (n)
|
|
81
|
-
return n;
|
|
82
|
-
var o = r.displayName || r.name || "";
|
|
83
|
-
return o !== "" ? t + "(" + o + ")" : t;
|
|
84
|
-
}
|
|
85
|
-
function re(e) {
|
|
86
|
-
return e.displayName || "Context";
|
|
87
|
-
}
|
|
88
|
-
function h(e) {
|
|
89
|
-
if (e == null)
|
|
90
|
-
return null;
|
|
91
|
-
if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
92
|
-
return e.displayName || e.name || null;
|
|
93
|
-
if (typeof e == "string")
|
|
94
|
-
return e;
|
|
95
|
-
switch (e) {
|
|
96
|
-
case s:
|
|
97
|
-
return "Fragment";
|
|
98
|
-
case k:
|
|
99
|
-
return "Portal";
|
|
100
|
-
case b:
|
|
101
|
-
return "Profiler";
|
|
102
|
-
case y:
|
|
103
|
-
return "StrictMode";
|
|
104
|
-
case C:
|
|
105
|
-
return "Suspense";
|
|
106
|
-
case g:
|
|
107
|
-
return "SuspenseList";
|
|
108
|
-
}
|
|
109
|
-
if (typeof e == "object")
|
|
110
|
-
switch (e.$$typeof) {
|
|
111
|
-
case R:
|
|
112
|
-
var r = e;
|
|
113
|
-
return re(r) + ".Consumer";
|
|
114
|
-
case D:
|
|
115
|
-
var t = e;
|
|
116
|
-
return re(t._context) + ".Provider";
|
|
117
|
-
case d:
|
|
118
|
-
return We(e, e.render, "ForwardRef");
|
|
119
|
-
case E:
|
|
120
|
-
var n = e.displayName || null;
|
|
121
|
-
return n !== null ? n : h(e.type) || "Memo";
|
|
122
|
-
case T: {
|
|
123
|
-
var o = e, u = o._payload, i = o._init;
|
|
124
|
-
try {
|
|
125
|
-
return h(i(u));
|
|
126
|
-
} catch {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
var O = Object.assign, A = 0, te, ne, ae, ie, oe, ue, se;
|
|
134
|
-
function le() {
|
|
135
|
-
}
|
|
136
|
-
le.__reactDisabledLog = !0;
|
|
137
|
-
function $e() {
|
|
138
|
-
{
|
|
139
|
-
if (A === 0) {
|
|
140
|
-
te = console.log, ne = console.info, ae = console.warn, ie = console.error, oe = console.group, ue = console.groupCollapsed, se = console.groupEnd;
|
|
141
|
-
var e = {
|
|
142
|
-
configurable: !0,
|
|
143
|
-
enumerable: !0,
|
|
144
|
-
value: le,
|
|
145
|
-
writable: !0
|
|
146
|
-
};
|
|
147
|
-
Object.defineProperties(console, {
|
|
148
|
-
info: e,
|
|
149
|
-
log: e,
|
|
150
|
-
warn: e,
|
|
151
|
-
error: e,
|
|
152
|
-
group: e,
|
|
153
|
-
groupCollapsed: e,
|
|
154
|
-
groupEnd: e
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
A++;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function Ye() {
|
|
161
|
-
{
|
|
162
|
-
if (A--, A === 0) {
|
|
163
|
-
var e = {
|
|
164
|
-
configurable: !0,
|
|
165
|
-
enumerable: !0,
|
|
166
|
-
writable: !0
|
|
167
|
-
};
|
|
168
|
-
Object.defineProperties(console, {
|
|
169
|
-
log: O({}, e, {
|
|
170
|
-
value: te
|
|
171
|
-
}),
|
|
172
|
-
info: O({}, e, {
|
|
173
|
-
value: ne
|
|
174
|
-
}),
|
|
175
|
-
warn: O({}, e, {
|
|
176
|
-
value: ae
|
|
177
|
-
}),
|
|
178
|
-
error: O({}, e, {
|
|
179
|
-
value: ie
|
|
180
|
-
}),
|
|
181
|
-
group: O({}, e, {
|
|
182
|
-
value: oe
|
|
183
|
-
}),
|
|
184
|
-
groupCollapsed: O({}, e, {
|
|
185
|
-
value: ue
|
|
186
|
-
}),
|
|
187
|
-
groupEnd: O({}, e, {
|
|
188
|
-
value: se
|
|
189
|
-
})
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
A < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
var N = w.ReactCurrentDispatcher, J;
|
|
196
|
-
function L(e, r, t) {
|
|
197
|
-
{
|
|
198
|
-
if (J === void 0)
|
|
199
|
-
try {
|
|
200
|
-
throw Error();
|
|
201
|
-
} catch (o) {
|
|
202
|
-
var n = o.stack.trim().match(/\n( *(at )?)/);
|
|
203
|
-
J = n && n[1] || "";
|
|
204
|
-
}
|
|
205
|
-
return `
|
|
206
|
-
` + J + e;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
var B = !1, M;
|
|
210
|
-
{
|
|
211
|
-
var Le = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
|
-
M = new Le();
|
|
213
|
-
}
|
|
214
|
-
function fe(e, r) {
|
|
215
|
-
if (!e || B)
|
|
216
|
-
return "";
|
|
217
|
-
{
|
|
218
|
-
var t = M.get(e);
|
|
219
|
-
if (t !== void 0)
|
|
220
|
-
return t;
|
|
221
|
-
}
|
|
222
|
-
var n;
|
|
223
|
-
B = !0;
|
|
224
|
-
var o = Error.prepareStackTrace;
|
|
225
|
-
Error.prepareStackTrace = void 0;
|
|
226
|
-
var u;
|
|
227
|
-
u = N.current, N.current = null, $e();
|
|
228
|
-
try {
|
|
229
|
-
if (r) {
|
|
230
|
-
var i = function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
};
|
|
233
|
-
if (Object.defineProperty(i.prototype, "props", {
|
|
234
|
-
set: function() {
|
|
235
|
-
throw Error();
|
|
236
|
-
}
|
|
237
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
238
|
-
try {
|
|
239
|
-
Reflect.construct(i, []);
|
|
240
|
-
} catch (p) {
|
|
241
|
-
n = p;
|
|
242
|
-
}
|
|
243
|
-
Reflect.construct(e, [], i);
|
|
244
|
-
} else {
|
|
245
|
-
try {
|
|
246
|
-
i.call();
|
|
247
|
-
} catch (p) {
|
|
248
|
-
n = p;
|
|
249
|
-
}
|
|
250
|
-
e.call(i.prototype);
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
try {
|
|
254
|
-
throw Error();
|
|
255
|
-
} catch (p) {
|
|
256
|
-
n = p;
|
|
257
|
-
}
|
|
258
|
-
e();
|
|
259
|
-
}
|
|
260
|
-
} catch (p) {
|
|
261
|
-
if (p && n && typeof p.stack == "string") {
|
|
262
|
-
for (var a = p.stack.split(`
|
|
263
|
-
`), v = n.stack.split(`
|
|
264
|
-
`), l = a.length - 1, f = v.length - 1; l >= 1 && f >= 0 && a[l] !== v[f]; )
|
|
265
|
-
f--;
|
|
266
|
-
for (; l >= 1 && f >= 0; l--, f--)
|
|
267
|
-
if (a[l] !== v[f]) {
|
|
268
|
-
if (l !== 1 || f !== 1)
|
|
269
|
-
do
|
|
270
|
-
if (l--, f--, f < 0 || a[l] !== v[f]) {
|
|
271
|
-
var m = `
|
|
272
|
-
` + a[l].replace(" at new ", " at ");
|
|
273
|
-
return e.displayName && m.includes("<anonymous>") && (m = m.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, m), m;
|
|
274
|
-
}
|
|
275
|
-
while (l >= 1 && f >= 0);
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
} finally {
|
|
280
|
-
B = !1, N.current = u, Ye(), Error.prepareStackTrace = o;
|
|
281
|
-
}
|
|
282
|
-
var j = e ? e.displayName || e.name : "", S = j ? L(j) : "";
|
|
283
|
-
return typeof e == "function" && M.set(e, S), S;
|
|
284
|
-
}
|
|
285
|
-
function Me(e, r, t) {
|
|
286
|
-
return fe(e, !1);
|
|
287
|
-
}
|
|
288
|
-
function Ve(e) {
|
|
289
|
-
var r = e.prototype;
|
|
290
|
-
return !!(r && r.isReactComponent);
|
|
291
|
-
}
|
|
292
|
-
function V(e, r, t) {
|
|
293
|
-
if (e == null)
|
|
294
|
-
return "";
|
|
295
|
-
if (typeof e == "function")
|
|
296
|
-
return fe(e, Ve(e));
|
|
297
|
-
if (typeof e == "string")
|
|
298
|
-
return L(e);
|
|
299
|
-
switch (e) {
|
|
300
|
-
case C:
|
|
301
|
-
return L("Suspense");
|
|
302
|
-
case g:
|
|
303
|
-
return L("SuspenseList");
|
|
304
|
-
}
|
|
305
|
-
if (typeof e == "object")
|
|
306
|
-
switch (e.$$typeof) {
|
|
307
|
-
case d:
|
|
308
|
-
return Me(e.render);
|
|
309
|
-
case E:
|
|
310
|
-
return V(e.type, r, t);
|
|
311
|
-
case T: {
|
|
312
|
-
var n = e, o = n._payload, u = n._init;
|
|
313
|
-
try {
|
|
314
|
-
return V(u(o), r, t);
|
|
315
|
-
} catch {
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return "";
|
|
320
|
-
}
|
|
321
|
-
var F = Object.prototype.hasOwnProperty, ce = {}, de = w.ReactDebugCurrentFrame;
|
|
322
|
-
function U(e) {
|
|
323
|
-
if (e) {
|
|
324
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
325
|
-
de.setExtraStackFrame(t);
|
|
326
|
-
} else
|
|
327
|
-
de.setExtraStackFrame(null);
|
|
328
|
-
}
|
|
329
|
-
function Ue(e, r, t, n, o) {
|
|
330
|
-
{
|
|
331
|
-
var u = Function.call.bind(F);
|
|
332
|
-
for (var i in e)
|
|
333
|
-
if (u(e, i)) {
|
|
334
|
-
var a = void 0;
|
|
335
|
-
try {
|
|
336
|
-
if (typeof e[i] != "function") {
|
|
337
|
-
var v = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
338
|
-
throw v.name = "Invariant Violation", v;
|
|
339
|
-
}
|
|
340
|
-
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
341
|
-
} catch (l) {
|
|
342
|
-
a = l;
|
|
343
|
-
}
|
|
344
|
-
a && !(a instanceof Error) && (U(o), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), U(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, U(o), c("Failed %s type: %s", t, a.message), U(null));
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
var Ne = Array.isArray;
|
|
349
|
-
function q(e) {
|
|
350
|
-
return Ne(e);
|
|
351
|
-
}
|
|
352
|
-
function Je(e) {
|
|
353
|
-
{
|
|
354
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
355
|
-
return t;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
function Be(e) {
|
|
359
|
-
try {
|
|
360
|
-
return ve(e), !1;
|
|
361
|
-
} catch {
|
|
362
|
-
return !0;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
function ve(e) {
|
|
366
|
-
return "" + e;
|
|
367
|
-
}
|
|
368
|
-
function pe(e) {
|
|
369
|
-
if (Be(e))
|
|
370
|
-
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), ve(e);
|
|
371
|
-
}
|
|
372
|
-
var I = w.ReactCurrentOwner, qe = {
|
|
373
|
-
key: !0,
|
|
374
|
-
ref: !0,
|
|
375
|
-
__self: !0,
|
|
376
|
-
__source: !0
|
|
377
|
-
}, ge, ye, K;
|
|
378
|
-
K = {};
|
|
379
|
-
function Ke(e) {
|
|
380
|
-
if (F.call(e, "ref")) {
|
|
381
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
382
|
-
if (r && r.isReactWarning)
|
|
383
|
-
return !1;
|
|
384
|
-
}
|
|
385
|
-
return e.ref !== void 0;
|
|
386
|
-
}
|
|
387
|
-
function ze(e) {
|
|
388
|
-
if (F.call(e, "key")) {
|
|
389
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
390
|
-
if (r && r.isReactWarning)
|
|
391
|
-
return !1;
|
|
392
|
-
}
|
|
393
|
-
return e.key !== void 0;
|
|
394
|
-
}
|
|
395
|
-
function Ge(e, r) {
|
|
396
|
-
if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) {
|
|
397
|
-
var t = h(I.current.type);
|
|
398
|
-
K[t] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', h(I.current.type), e.ref), K[t] = !0);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
function Xe(e, r) {
|
|
402
|
-
{
|
|
403
|
-
var t = function() {
|
|
404
|
-
ge || (ge = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
405
|
-
};
|
|
406
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
407
|
-
get: t,
|
|
408
|
-
configurable: !0
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
function He(e, r) {
|
|
413
|
-
{
|
|
414
|
-
var t = function() {
|
|
415
|
-
ye || (ye = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
416
|
-
};
|
|
417
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
418
|
-
get: t,
|
|
419
|
-
configurable: !0
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
var Ze = function(e, r, t, n, o, u, i) {
|
|
424
|
-
var a = {
|
|
425
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
426
|
-
$$typeof: _,
|
|
427
|
-
// Built-in properties that belong on the element
|
|
428
|
-
type: e,
|
|
429
|
-
key: r,
|
|
430
|
-
ref: t,
|
|
431
|
-
props: i,
|
|
432
|
-
// Record the component responsible for creating this element.
|
|
433
|
-
_owner: u
|
|
434
|
-
};
|
|
435
|
-
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
436
|
-
configurable: !1,
|
|
437
|
-
enumerable: !1,
|
|
438
|
-
writable: !0,
|
|
439
|
-
value: !1
|
|
440
|
-
}), Object.defineProperty(a, "_self", {
|
|
441
|
-
configurable: !1,
|
|
442
|
-
enumerable: !1,
|
|
443
|
-
writable: !1,
|
|
444
|
-
value: n
|
|
445
|
-
}), Object.defineProperty(a, "_source", {
|
|
446
|
-
configurable: !1,
|
|
447
|
-
enumerable: !1,
|
|
448
|
-
writable: !1,
|
|
449
|
-
value: o
|
|
450
|
-
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
451
|
-
};
|
|
452
|
-
function Qe(e, r, t, n, o) {
|
|
453
|
-
{
|
|
454
|
-
var u, i = {}, a = null, v = null;
|
|
455
|
-
t !== void 0 && (pe(t), a = "" + t), ze(r) && (pe(r.key), a = "" + r.key), Ke(r) && (v = r.ref, Ge(r, o));
|
|
456
|
-
for (u in r)
|
|
457
|
-
F.call(r, u) && !qe.hasOwnProperty(u) && (i[u] = r[u]);
|
|
458
|
-
if (e && e.defaultProps) {
|
|
459
|
-
var l = e.defaultProps;
|
|
460
|
-
for (u in l)
|
|
461
|
-
i[u] === void 0 && (i[u] = l[u]);
|
|
462
|
-
}
|
|
463
|
-
if (a || v) {
|
|
464
|
-
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
465
|
-
a && Xe(i, f), v && He(i, f);
|
|
466
|
-
}
|
|
467
|
-
return Ze(e, a, v, o, n, I.current, i);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
var z = w.ReactCurrentOwner, me = w.ReactDebugCurrentFrame;
|
|
471
|
-
function P(e) {
|
|
472
|
-
if (e) {
|
|
473
|
-
var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
|
|
474
|
-
me.setExtraStackFrame(t);
|
|
475
|
-
} else
|
|
476
|
-
me.setExtraStackFrame(null);
|
|
477
|
-
}
|
|
478
|
-
var G;
|
|
479
|
-
G = !1;
|
|
480
|
-
function X(e) {
|
|
481
|
-
return typeof e == "object" && e !== null && e.$$typeof === _;
|
|
482
|
-
}
|
|
483
|
-
function he() {
|
|
484
|
-
{
|
|
485
|
-
if (z.current) {
|
|
486
|
-
var e = h(z.current.type);
|
|
487
|
-
if (e)
|
|
488
|
-
return `
|
|
489
|
-
|
|
490
|
-
Check the render method of \`` + e + "`.";
|
|
491
|
-
}
|
|
492
|
-
return "";
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
function er(e) {
|
|
496
|
-
return "";
|
|
497
|
-
}
|
|
498
|
-
var be = {};
|
|
499
|
-
function rr(e) {
|
|
500
|
-
{
|
|
501
|
-
var r = he();
|
|
502
|
-
if (!r) {
|
|
503
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
504
|
-
t && (r = `
|
|
505
|
-
|
|
506
|
-
Check the top-level render call using <` + t + ">.");
|
|
507
|
-
}
|
|
508
|
-
return r;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
function Ee(e, r) {
|
|
512
|
-
{
|
|
513
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
514
|
-
return;
|
|
515
|
-
e._store.validated = !0;
|
|
516
|
-
var t = rr(r);
|
|
517
|
-
if (be[t])
|
|
518
|
-
return;
|
|
519
|
-
be[t] = !0;
|
|
520
|
-
var n = "";
|
|
521
|
-
e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + h(e._owner.type) + "."), P(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), P(null);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
function _e(e, r) {
|
|
525
|
-
{
|
|
526
|
-
if (typeof e != "object")
|
|
527
|
-
return;
|
|
528
|
-
if (q(e))
|
|
529
|
-
for (var t = 0; t < e.length; t++) {
|
|
530
|
-
var n = e[t];
|
|
531
|
-
X(n) && Ee(n, r);
|
|
532
|
-
}
|
|
533
|
-
else if (X(e))
|
|
534
|
-
e._store && (e._store.validated = !0);
|
|
535
|
-
else if (e) {
|
|
536
|
-
var o = Pe(e);
|
|
537
|
-
if (typeof o == "function" && o !== e.entries)
|
|
538
|
-
for (var u = o.call(e), i; !(i = u.next()).done; )
|
|
539
|
-
X(i.value) && Ee(i.value, r);
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
function tr(e) {
|
|
544
|
-
{
|
|
545
|
-
var r = e.type;
|
|
546
|
-
if (r == null || typeof r == "string")
|
|
547
|
-
return;
|
|
548
|
-
var t;
|
|
549
|
-
if (typeof r == "function")
|
|
550
|
-
t = r.propTypes;
|
|
551
|
-
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
|
|
552
|
-
// Inner props are checked in the reconciler.
|
|
553
|
-
r.$$typeof === E))
|
|
554
|
-
t = r.propTypes;
|
|
555
|
-
else
|
|
556
|
-
return;
|
|
557
|
-
if (t) {
|
|
558
|
-
var n = h(r);
|
|
559
|
-
Ue(t, e.props, "prop", n, e);
|
|
560
|
-
} else if (r.PropTypes !== void 0 && !G) {
|
|
561
|
-
G = !0;
|
|
562
|
-
var o = h(r);
|
|
563
|
-
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
|
|
564
|
-
}
|
|
565
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
function nr(e) {
|
|
569
|
-
{
|
|
570
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
571
|
-
var n = r[t];
|
|
572
|
-
if (n !== "children" && n !== "key") {
|
|
573
|
-
P(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), P(null);
|
|
574
|
-
break;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
e.ref !== null && (P(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), P(null));
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
var Re = {};
|
|
581
|
-
function Te(e, r, t, n, o, u) {
|
|
582
|
-
{
|
|
583
|
-
var i = Ie(e);
|
|
584
|
-
if (!i) {
|
|
585
|
-
var a = "";
|
|
586
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
587
|
-
var v = er();
|
|
588
|
-
v ? a += v : a += he();
|
|
589
|
-
var l;
|
|
590
|
-
e === null ? l = "null" : q(e) ? l = "array" : e !== void 0 && e.$$typeof === _ ? (l = "<" + (h(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
|
|
591
|
-
}
|
|
592
|
-
var f = Qe(e, r, t, o, u);
|
|
593
|
-
if (f == null)
|
|
594
|
-
return f;
|
|
595
|
-
if (i) {
|
|
596
|
-
var m = r.children;
|
|
597
|
-
if (m !== void 0)
|
|
598
|
-
if (n)
|
|
599
|
-
if (q(m)) {
|
|
600
|
-
for (var j = 0; j < m.length; j++)
|
|
601
|
-
_e(m[j], e);
|
|
602
|
-
Object.freeze && Object.freeze(m);
|
|
603
|
-
} else
|
|
604
|
-
c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
605
|
-
else
|
|
606
|
-
_e(m, e);
|
|
607
|
-
}
|
|
608
|
-
if (F.call(r, "key")) {
|
|
609
|
-
var S = h(e), p = Object.keys(r).filter(function(lr) {
|
|
610
|
-
return lr !== "key";
|
|
611
|
-
}), H = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
|
-
if (!Re[S + H]) {
|
|
613
|
-
var sr = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
|
|
614
|
-
c(`A props object containing a "key" prop is being spread into JSX:
|
|
615
|
-
let props = %s;
|
|
616
|
-
<%s {...props} />
|
|
617
|
-
React keys must be passed directly to JSX without using spread:
|
|
618
|
-
let props = %s;
|
|
619
|
-
<%s key={someKey} {...props} />`, H, S, sr, S), Re[S + H] = !0;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
return e === s ? nr(f) : tr(f), f;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
function ar(e, r, t) {
|
|
626
|
-
return Te(e, r, t, !0);
|
|
627
|
-
}
|
|
628
|
-
function ir(e, r, t) {
|
|
629
|
-
return Te(e, r, t, !1);
|
|
630
|
-
}
|
|
631
|
-
var or = ir, ur = ar;
|
|
632
|
-
$.Fragment = s, $.jsx = or, $.jsxs = ur;
|
|
633
|
-
}()), $;
|
|
634
|
-
}
|
|
635
|
-
process.env.NODE_ENV === "production" ? Z.exports = cr() : Z.exports = dr();
|
|
636
|
-
var vr = Z.exports;
|
|
637
|
-
const yr = ({
|
|
638
|
-
casdoorEndpoint: x,
|
|
639
|
-
clientId: _,
|
|
640
|
-
clientSecret: k
|
|
641
|
-
}) => fr({
|
|
1
|
+
import { defineConfig as m } from "auth-astro";
|
|
2
|
+
const d = ({
|
|
3
|
+
casdoorEndpoint: i,
|
|
4
|
+
clientId: r,
|
|
5
|
+
clientSecret: n
|
|
6
|
+
}) => m({
|
|
642
7
|
// Configure one or more authentication providers
|
|
643
8
|
providers: [
|
|
644
9
|
{
|
|
645
10
|
id: "casdoor",
|
|
646
11
|
name: "SpringMicroHost",
|
|
647
12
|
type: "oidc",
|
|
648
|
-
issuer:
|
|
13
|
+
issuer: i,
|
|
649
14
|
authorization: { params: { scope: "openid email profile" } },
|
|
650
15
|
token: !0,
|
|
651
16
|
checks: ["state"],
|
|
652
|
-
clientId:
|
|
653
|
-
clientSecret:
|
|
654
|
-
profile(
|
|
17
|
+
clientId: r,
|
|
18
|
+
clientSecret: n,
|
|
19
|
+
profile(e) {
|
|
655
20
|
return {
|
|
656
|
-
id:
|
|
657
|
-
name:
|
|
658
|
-
email:
|
|
659
|
-
username:
|
|
660
|
-
image:
|
|
21
|
+
id: e.id,
|
|
22
|
+
name: e.displayName,
|
|
23
|
+
email: e.email,
|
|
24
|
+
username: e.name ?? e.email,
|
|
25
|
+
image: e.avatar
|
|
661
26
|
};
|
|
662
27
|
}
|
|
663
28
|
}
|
|
@@ -667,15 +32,14 @@ const yr = ({
|
|
|
667
32
|
signIn: "/sign-in"
|
|
668
33
|
},
|
|
669
34
|
callbacks: {
|
|
670
|
-
async jwt({ token:
|
|
671
|
-
return console.log("JWT",
|
|
35
|
+
async jwt({ token: e, account: a, user: s }) {
|
|
36
|
+
return console.log("JWT", e, a, s), a && (e.accessToken = a.access_token ?? "", e.username = s.username, e.id = s.id), e;
|
|
672
37
|
},
|
|
673
|
-
async session({ session:
|
|
674
|
-
return
|
|
38
|
+
async session({ session: e, token: a, user: s }) {
|
|
39
|
+
return e.accessToken = a.accessToken, e.user.id = a.id, e.user.username = a.username, e;
|
|
675
40
|
}
|
|
676
41
|
}
|
|
677
|
-
})
|
|
42
|
+
});
|
|
678
43
|
export {
|
|
679
|
-
|
|
680
|
-
yr as getAuthConfig
|
|
44
|
+
d as getAuthConfig
|
|
681
45
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var re;function je(){if(re)return A;re=1;var F=w,_=Symbol.for("react.element"),I=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,h=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function W(T,d,P){var g,R={},O=null,M=null;P!==void 0&&(O=""+P),d.key!==void 0&&(O=""+d.key),d.ref!==void 0&&(M=d.ref);for(g in d)s.call(d,g)&&!E.hasOwnProperty(g)&&(R[g]=d[g]);if(T&&T.defaultProps)for(g in d=T.defaultProps,d)R[g]===void 0&&(R[g]=d[g]);return{$$typeof:_,type:T,key:O,ref:M,props:R,_owner:h.current}}return A.Fragment=I,A.jsx=W,A.jsxs=W,A}var D={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var te;function xe(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var F=w,_=Symbol.for("react.element"),I=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),T=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),ne=Symbol.iterator,Fe="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ne&&e[ne]||e[Fe];return typeof r=="function"?r:null}var j=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];We("error",e,t)}}function We(e,r,t){{var n=j.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ye=!1,$e=!1,Le=!1,Me=!1,Ve=!1,ae;ae=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===E||Ve||e===h||e===P||e===g||Me||e===M||Ye||$e||Le||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===R||e.$$typeof===W||e.$$typeof===T||e.$$typeof===d||e.$$typeof===ae||e.getModuleId!==void 0))}function Ne(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ie(e){return e.displayName||"Context"}function m(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case s:return"Fragment";case I:return"Portal";case E:return"Profiler";case h:return"StrictMode";case P:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case T:var r=e;return ie(r)+".Consumer";case W:var t=e;return ie(t._context)+".Provider";case d:return Ne(e,e.render,"ForwardRef");case R:var n=e.displayName||null;return n!==null?n:m(e.type)||"Memo";case O:{var o=e,u=o._payload,i=o._init;try{return m(i(u))}catch{return null}}}return null}var S=Object.assign,Y=0,oe,ue,se,fe,le,ce,de;function ve(){}ve.__reactDisabledLog=!0;function Je(){{if(Y===0){oe=console.log,ue=console.info,se=console.warn,fe=console.error,le=console.group,ce=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Y++}}function Be(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:oe}),info:S({},e,{value:ue}),warn:S({},e,{value:se}),error:S({},e,{value:fe}),group:S({},e,{value:le}),groupCollapsed:S({},e,{value:ce}),groupEnd:S({},e,{value:de})})}Y<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=j.ReactCurrentDispatcher,K;function V(e,r,t){{if(K===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);K=n&&n[1]||""}return`
|
|
18
|
-
`+K+e}}var z=!1,U;{var qe=typeof WeakMap=="function"?WeakMap:Map;U=new qe}function pe(e,r){if(!e||z)return"";{var t=U.get(e);if(t!==void 0)return t}var n;z=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Je();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(p){n=p}Reflect.construct(e,[],i)}else{try{i.call()}catch(p){n=p}e.call(i.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(p){if(p&&n&&typeof p.stack=="string"){for(var a=p.stack.split(`
|
|
19
|
-
`),v=n.stack.split(`
|
|
20
|
-
`),f=a.length-1,l=v.length-1;f>=1&&l>=0&&a[f]!==v[l];)l--;for(;f>=1&&l>=0;f--,l--)if(a[f]!==v[l]){if(f!==1||l!==1)do if(f--,l--,l<0||a[f]!==v[l]){var y=`
|
|
21
|
-
`+a[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,y),y}while(f>=1&&l>=0);break}}}finally{z=!1,q.current=u,Be(),Error.prepareStackTrace=o}var k=e?e.displayName||e.name:"",C=k?V(k):"";return typeof e=="function"&&U.set(e,C),C}function Ke(e,r,t){return pe(e,!1)}function ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,ze(e));if(typeof e=="string")return V(e);switch(e){case P:return V("Suspense");case g:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ke(e.render);case R:return N(e.type,r,t);case O:{var n=e,o=n._payload,u=n._init;try{return N(u(o),r,t)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,ge={},he=j.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function Ge(e,r,t,n,o){{var u=Function.call.bind($);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var v=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(J(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),J(null)),a instanceof Error&&!(a.message in ge)&&(ge[a.message]=!0,J(o),c("Failed %s type: %s",t,a.message),J(null))}}}var Xe=Array.isArray;function G(e){return Xe(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function me(e){if(Ze(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),ye(e)}var L=j.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},be,Ee,X;X={};function er(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){if(typeof e.ref=="string"&&L.current&&r&&L.current.stateNode!==r){var t=m(L.current.type);X[t]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',m(L.current.type),e.ref),X[t]=!0)}}function nr(e,r){{var t=function(){be||(be=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){Ee||(Ee=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ir=function(e,r,t,n,o,u,i){var a={$$typeof:_,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function or(e,r,t,n,o){{var u,i={},a=null,v=null;t!==void 0&&(me(t),a=""+t),rr(r)&&(me(r.key),a=""+r.key),er(r)&&(v=r.ref,tr(r,o));for(u in r)$.call(r,u)&&!Qe.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var f=e.defaultProps;for(u in f)i[u]===void 0&&(i[u]=f[u])}if(a||v){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(i,l),v&&ar(i,l)}return ir(e,a,v,o,n,L.current,i)}}var H=j.ReactCurrentOwner,Re=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===_}function _e(){{if(H.current){var e=m(H.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function ur(e){return""}var Te={};function sr(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==H.current&&(n=" It was passed a child from "+m(e._owner.type)+"."),x(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),x(null)}}function Se(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Oe(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var o=Ie(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)Q(i.value)&&Oe(i.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===R))t=r.propTypes;else return;if(t){var n=m(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var o=m(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){x(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),x(null);break}}e.ref!==null&&(x(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}var Ce={};function we(e,r,t,n,o,u){{var i=Ue(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var v=ur();v?a+=v:a+=_e();var f;e===null?f="null":G(e)?f="array":e!==void 0&&e.$$typeof===_?(f="<"+(m(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var l=or(e,r,t,o,u);if(l==null)return l;if(i){var y=r.children;if(y!==void 0)if(n)if(G(y)){for(var k=0;k<y.length;k++)Se(y[k],e);Object.freeze&&Object.freeze(y)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Se(y,e)}if($.call(r,"key")){var C=m(e),p=Object.keys(r).filter(function(hr){return hr!=="key"}),ee=p.length>0?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}";if(!Ce[C+ee]){var gr=p.length>0?"{"+p.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ee,C,gr,C),Ce[C+ee]=!0}}return e===s?lr(l):fr(l),l}}function cr(e,r,t){return we(e,r,t,!0)}function dr(e,r,t){return we(e,r,t,!1)}var vr=dr,pr=cr;D.Fragment=s,D.jsx=vr,D.jsxs=pr}()),D}process.env.NODE_ENV==="production"?B.exports=je():B.exports=xe();var ke=B.exports;const Ae=({casdoorEndpoint:F,clientId:_,clientSecret:I})=>Pe.defineConfig({providers:[{id:"casdoor",name:"SpringMicroHost",type:"oidc",issuer:F,authorization:{params:{scope:"openid email profile"}},token:!0,checks:["state"],clientId:_,clientSecret:I,profile(s){return{id:s.id,name:s.displayName,email:s.email,username:s.name??s.email,image:s.avatar}}}],pages:{signIn:"/sign-in"},callbacks:{async jwt({token:s,account:h,user:E}){return console.log("JWT",s,h,E),h&&(s.accessToken=h.access_token??"",s.username=E.username,s.id=E.id),s},async session({session:s,token:h,user:E}){return s.accessToken=h.accessToken,s.user.id=h.id,s.user.username=h.username,s}}}),De=()=>ke.jsx("h1",{children:"Test"});b.Test=De,b.getAuthConfig=Ae,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(i,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("auth-astro")):typeof define=="function"&&define.amd?define(["exports","auth-astro"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i["@springmicro/auth"]={},i["Auth-astro"]))})(this,function(i,a){"use strict";const t=({casdoorEndpoint:r,clientId:u,clientSecret:o})=>a.defineConfig({providers:[{id:"casdoor",name:"SpringMicroHost",type:"oidc",issuer:r,authorization:{params:{scope:"openid email profile"}},token:!0,checks:["state"],clientId:u,clientSecret:o,profile(e){return{id:e.id,name:e.displayName,email:e.email,username:e.name??e.email,image:e.avatar}}}],pages:{signIn:"/sign-in"},callbacks:{async jwt({token:e,account:s,user:n}){return console.log("JWT",e,s,n),s&&(e.accessToken=s.access_token??"",e.username=n.username,e.id=n.id),e},async session({session:e,token:s,user:n}){return e.accessToken=s.accessToken,e.user.id=s.id,e.user.username=s.username,e}}});i.getAuthConfig=t,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springmicro/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"vite": "^5.2.0",
|
|
35
35
|
"vite-plugin-dts": "^3.9.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7f7d9ece4d987ffceb47b504a95b973544862086"
|
|
38
38
|
}
|
package/src/index.tsx
CHANGED
package/tsconfig.json
CHANGED
package/src/App.css
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#root {
|
|
2
|
-
max-width: 1280px;
|
|
3
|
-
margin: 0 auto;
|
|
4
|
-
padding: 2rem;
|
|
5
|
-
text-align: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.logo {
|
|
9
|
-
height: 6em;
|
|
10
|
-
padding: 1.5em;
|
|
11
|
-
will-change: filter;
|
|
12
|
-
transition: filter 300ms;
|
|
13
|
-
}
|
|
14
|
-
.logo:hover {
|
|
15
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
16
|
-
}
|
|
17
|
-
.logo.react:hover {
|
|
18
|
-
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@keyframes logo-spin {
|
|
22
|
-
from {
|
|
23
|
-
transform: rotate(0deg);
|
|
24
|
-
}
|
|
25
|
-
to {
|
|
26
|
-
transform: rotate(360deg);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
-
a:nth-of-type(2) .logo {
|
|
32
|
-
animation: logo-spin infinite 20s linear;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.card {
|
|
37
|
-
padding: 2em;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.read-the-docs {
|
|
41
|
-
color: #888;
|
|
42
|
-
}
|
package/src/App.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import reactLogo from './assets/react.svg'
|
|
3
|
-
import viteLogo from '/vite.svg'
|
|
4
|
-
import './App.css'
|
|
5
|
-
|
|
6
|
-
function App() {
|
|
7
|
-
const [count, setCount] = useState(0)
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
<div>
|
|
12
|
-
<a href="https://vitejs.dev" target="_blank">
|
|
13
|
-
<img src={viteLogo} className="logo" alt="Vite logo" />
|
|
14
|
-
</a>
|
|
15
|
-
<a href="https://react.dev" target="_blank">
|
|
16
|
-
<img src={reactLogo} className="logo react" alt="React logo" />
|
|
17
|
-
</a>
|
|
18
|
-
</div>
|
|
19
|
-
<h1>Vite + React</h1>
|
|
20
|
-
<div className="card">
|
|
21
|
-
<button onClick={() => setCount((count) => count + 1)}>
|
|
22
|
-
count is {count}
|
|
23
|
-
</button>
|
|
24
|
-
<p>
|
|
25
|
-
Edit <code>src/App.tsx</code> and save to test HMR
|
|
26
|
-
</p>
|
|
27
|
-
</div>
|
|
28
|
-
<p className="read-the-docs">
|
|
29
|
-
Click on the Vite and React logos to learn more
|
|
30
|
-
</p>
|
|
31
|
-
</>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export default App
|
package/src/assets/react.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
package/src/index.css
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
button {
|
|
39
|
-
border-radius: 8px;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
padding: 0.6em 1.2em;
|
|
42
|
-
font-size: 1em;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
font-family: inherit;
|
|
45
|
-
background-color: #1a1a1a;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: border-color 0.25s;
|
|
48
|
-
}
|
|
49
|
-
button:hover {
|
|
50
|
-
border-color: #646cff;
|
|
51
|
-
}
|
|
52
|
-
button:focus,
|
|
53
|
-
button:focus-visible {
|
|
54
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (prefers-color-scheme: light) {
|
|
58
|
-
:root {
|
|
59
|
-
color: #213547;
|
|
60
|
-
background-color: #ffffff;
|
|
61
|
-
}
|
|
62
|
-
a:hover {
|
|
63
|
-
color: #747bff;
|
|
64
|
-
}
|
|
65
|
-
button {
|
|
66
|
-
background-color: #f9f9f9;
|
|
67
|
-
}
|
|
68
|
-
}
|
package/src/main.tsx
DELETED