zudoku 0.63.0 → 0.64.0
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/client.d.ts +8 -0
- package/dist/app/entry.server.js +14 -1
- package/dist/app/entry.server.js.map +1 -1
- package/dist/config/config.d.ts +3 -1
- package/dist/config/validators/BuildSchema.d.ts +5 -4
- package/dist/config/validators/BuildSchema.js +5 -2
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +20 -20
- package/dist/config/validators/validate.d.ts +10 -12
- package/dist/config/validators/validate.js +8 -8
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +6 -1
- package/dist/lib/authentication/authentication.d.ts +17 -9
- package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +6 -5
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +6 -6
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +5 -5
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +3 -2
- package/dist/lib/authentication/hook.js +12 -8
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +4 -4
- package/dist/lib/authentication/providers/azureb2c.js +3 -3
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +2 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -7
- package/dist/lib/authentication/providers/openid.js +5 -3
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +35 -31
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +1 -5
- package/dist/lib/authentication/state.js +2 -14
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +6 -14
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -0
- package/dist/lib/core/ZudokuContext.js +2 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +2 -2
- package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -0
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +4 -9
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +12 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -21
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +13 -2
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +5 -5
- package/dist/lib/ui/Callout.js +5 -5
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +1 -1
- package/dist/lib/ui/ReactComponentDoc.js +2 -2
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -1
- package/dist/lib/util/MdxComponents.js +3 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/syncZustandState.d.ts +5 -0
- package/dist/lib/util/syncZustandState.js +14 -0
- package/dist/lib/util/syncZustandState.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +3 -1
- package/dist/vite/api/SchemaManager.js +22 -3
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +2 -2
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/plugin-api.js +14 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-docs.js +1 -1
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +4 -2
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/dist/vite/plugin-mdx.js +36 -30
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{ErrorAlert-VBJ8aHH7.js → ErrorAlert-DE3Sf66a.js} +1711 -1772
- package/lib/ErrorAlert-DE3Sf66a.js.map +1 -0
- package/lib/{MdxPage-DFRNwSsc.js → MdxPage-DZfeC0QY.js} +81 -80
- package/lib/MdxPage-DZfeC0QY.js.map +1 -0
- package/lib/{OAuthErrorPage-DJUOdr6Q.js → OAuthErrorPage-BycMozgn.js} +8 -8
- package/lib/{OAuthErrorPage-DJUOdr6Q.js.map → OAuthErrorPage-BycMozgn.js.map} +1 -1
- package/lib/{OasProvider-D2NYAaBN.js → OasProvider-Bf5zBDBY.js} +3 -3
- package/lib/{OasProvider-D2NYAaBN.js.map → OasProvider-Bf5zBDBY.js.map} +1 -1
- package/lib/{OperationList-DmXCI4NU.js → OperationList-Cmiw1xm2.js} +10 -10
- package/lib/{OperationList-DmXCI4NU.js.map → OperationList-Cmiw1xm2.js.map} +1 -1
- package/lib/{Pagination-CT4VUR6u.js → Pagination-CJszmeSA.js} +3 -3
- package/lib/{Pagination-CT4VUR6u.js.map → Pagination-CJszmeSA.js.map} +1 -1
- package/lib/RouteGuard-DhU3LRr1.js +81 -0
- package/lib/RouteGuard-DhU3LRr1.js.map +1 -0
- package/lib/{RouterError-fm21cqlj.js → RouterError-VDLnrFqF.js} +5 -5
- package/lib/{RouterError-fm21cqlj.js.map → RouterError-VDLnrFqF.js.map} +1 -1
- package/lib/{SchemaList-uElsscMN.js → SchemaList-xZSf3IMh.js} +7 -7
- package/lib/{SchemaList-uElsscMN.js.map → SchemaList-xZSf3IMh.js.map} +1 -1
- package/lib/{SchemaView-CNQ3VAbI.js → SchemaView-tHXTm5oM.js} +3 -3
- package/lib/{SchemaView-CNQ3VAbI.js.map → SchemaView-tHXTm5oM.js.map} +1 -1
- package/lib/{Select-CPoGZU_V.js → Select-C1DeCqKv.js} +3 -3
- package/lib/{Select-CPoGZU_V.js.map → Select-C1DeCqKv.js.map} +1 -1
- package/lib/SignUp-6SGx9Yyq.js +50 -0
- package/lib/SignUp-6SGx9Yyq.js.map +1 -0
- package/lib/{SyntaxHighlight-B0laqAqK.js → SyntaxHighlight-zvlnSnHB.js} +789 -778
- package/lib/{SyntaxHighlight-B0laqAqK.js.map → SyntaxHighlight-zvlnSnHB.js.map} +1 -1
- package/lib/{Toc-KzXCRqrX.js → Toc-Da9yp7lo.js} +5 -5
- package/lib/Toc-Da9yp7lo.js.map +1 -0
- package/lib/{ZudokuContext-BXTZApgy.js → ZudokuContext-BUZ5hkWB.js} +33 -31
- package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js → chunk-PVWAREVJ-BMhpCH5D.js} +7 -7
- package/lib/{chunk-PVWAREVJ-BO6B-RAk.js.map → chunk-PVWAREVJ-BMhpCH5D.js.map} +1 -1
- package/lib/{circular-BWT7_Ahq.js → circular-DvuimBGQ.js} +2 -2
- package/lib/{circular-BWT7_Ahq.js.map → circular-DvuimBGQ.js.map} +1 -1
- package/lib/{createServer-zhJZSgor.js → createServer-D9UvCoDf.js} +4 -4
- package/lib/{createServer-zhJZSgor.js.map → createServer-D9UvCoDf.js.map} +1 -1
- package/lib/{errors-XqO6MsfU.js → errors-CuGgh3hf.js} +2 -2
- package/lib/{errors-XqO6MsfU.js.map → errors-CuGgh3hf.js.map} +1 -1
- package/lib/hook-CMeoxziF.js +40 -0
- package/lib/hook-CMeoxziF.js.map +1 -0
- package/lib/{index-BPSpOxTK.js → index-B1rmok4X.js} +148 -147
- package/lib/index-B1rmok4X.js.map +1 -0
- package/lib/{index-D8Btv4uT.js → index-Cr9_YzOZ.js} +826 -780
- package/lib/index-Cr9_YzOZ.js.map +1 -0
- package/lib/{index-C5L4favO.js → index-rYHsvtTo.js} +2 -2
- package/lib/{index-C5L4favO.js.map → index-rYHsvtTo.js.map} +1 -1
- package/lib/{mutation-CdGPxHNX.js → mutation-BSU0xu4m.js} +2 -2
- package/lib/{mutation-CdGPxHNX.js.map → mutation-BSU0xu4m.js.map} +1 -1
- package/lib/ui/Callout.js +18 -18
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/CodeBlock.js +217 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +22 -19
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/ReactComponentDoc.js +13 -13
- package/lib/ui/ReactComponentDoc.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-Cd7Yg_uG.js → useExposedProps-U3pmsHaG.js} +2 -2
- package/lib/{useExposedProps-Cd7Yg_uG.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
- package/lib/zudoku.__internal.js +7 -7
- package/lib/zudoku.auth-auth0.js +13 -13
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +28 -28
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +40 -40
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +53 -56
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +111 -52
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +6 -6
- package/lib/zudoku.hooks.js +4 -4
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +99 -99
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +10 -9
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +38 -38
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +18 -10
- package/src/app/entry.server.tsx +16 -6
- package/src/app/main.css +61 -9
- package/src/lib/authentication/authentication.ts +22 -4
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +7 -5
- package/src/lib/authentication/components/SignOut.tsx +7 -6
- package/src/lib/authentication/components/SignUp.tsx +5 -8
- package/src/lib/authentication/hook.ts +21 -10
- package/src/lib/authentication/providers/auth0.tsx +2 -1
- package/src/lib/authentication/providers/azureb2c.tsx +10 -3
- package/src/lib/authentication/providers/clerk.tsx +9 -2
- package/src/lib/authentication/providers/openid.tsx +20 -15
- package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
- package/src/lib/authentication/providers/supabase.tsx +59 -43
- package/src/lib/authentication/state.ts +3 -23
- package/src/lib/components/Zudoku.tsx +3 -3
- package/src/lib/components/navigation/Toc.tsx +3 -3
- package/src/lib/core/RouteGuard.tsx +33 -13
- package/src/lib/core/ZudokuContext.ts +3 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +4 -1
- package/src/lib/plugins/markdown/index.tsx +2 -0
- package/src/lib/plugins/openapi/index.tsx +9 -29
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +13 -2
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +102 -58
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
- package/src/lib/shiki.ts +16 -2
- package/src/lib/ui/Callout.tsx +10 -5
- package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -3
- package/src/lib/ui/ReactComponentDoc.tsx +17 -17
- package/src/lib/ui/SyntaxHighlight.tsx +6 -1
- package/src/lib/util/MdxComponents.tsx +3 -5
- package/src/lib/util/syncZustandState.ts +22 -0
- package/lib/CodeBlock-CanTUJLl.js +0 -221
- package/lib/CodeBlock-CanTUJLl.js.map +0 -1
- package/lib/ErrorAlert-VBJ8aHH7.js.map +0 -1
- package/lib/MdxPage-DFRNwSsc.js.map +0 -1
- package/lib/RouteGuard-Bg0Lu0OU.js +0 -56
- package/lib/RouteGuard-Bg0Lu0OU.js.map +0 -1
- package/lib/SignUp-BraHuRN_.js +0 -56
- package/lib/SignUp-BraHuRN_.js.map +0 -1
- package/lib/Toc-KzXCRqrX.js.map +0 -1
- package/lib/ZudokuContext-BXTZApgy.js.map +0 -1
- package/lib/hook-CAebs2rv.js +0 -31
- package/lib/hook-CAebs2rv.js.map +0 -1
- package/lib/index-BPSpOxTK.js.map +0 -1
- package/lib/index-D8Btv4uT.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as D } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { g as Le } from "./invariant-Bm-FVUQE.js";
|
|
3
|
-
import { E as Ue } from "./index-
|
|
3
|
+
import { E as Ue } from "./index-B1rmok4X.js";
|
|
4
4
|
import { C as xe } from "./ClientOnly-E7hGysn1.js";
|
|
5
|
-
import { j as Ce, u as S } from "./ZudokuContext-
|
|
6
|
-
import { C as Ie, O as re, A as R } from "./errors-
|
|
7
|
-
import { C as je, O as Oe } from "./OAuthErrorPage-
|
|
5
|
+
import { j as Ce, u as S } from "./ZudokuContext-BUZ5hkWB.js";
|
|
6
|
+
import { C as Ie, O as re, A as R } from "./errors-CuGgh3hf.js";
|
|
7
|
+
import { C as je, O as Oe } from "./OAuthErrorPage-BycMozgn.js";
|
|
8
8
|
var J = { exports: {} }, De = J.exports, oe;
|
|
9
9
|
function Je() {
|
|
10
10
|
return oe || (oe = 1, (function(t) {
|
|
@@ -50,36 +50,36 @@ function Je() {
|
|
|
50
50
|
typeof console !== n && (p.call(this), this[l].apply(this, arguments));
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function _(l, m, c) {
|
|
54
54
|
return y(l) || k.apply(this, arguments);
|
|
55
55
|
}
|
|
56
56
|
function f(l, m) {
|
|
57
|
-
var c = this, j, H, L,
|
|
58
|
-
typeof l == "string" ?
|
|
57
|
+
var c = this, j, H, L, b = "loglevel";
|
|
58
|
+
typeof l == "string" ? b += ":" + l : typeof l == "symbol" && (b = void 0);
|
|
59
59
|
function Ee(h) {
|
|
60
60
|
var g = (s[h] || "silent").toUpperCase();
|
|
61
|
-
if (!(typeof window === n || !
|
|
61
|
+
if (!(typeof window === n || !b)) {
|
|
62
62
|
try {
|
|
63
|
-
window.localStorage[
|
|
63
|
+
window.localStorage[b] = g;
|
|
64
64
|
return;
|
|
65
65
|
} catch {
|
|
66
66
|
}
|
|
67
67
|
try {
|
|
68
|
-
window.document.cookie = encodeURIComponent(
|
|
68
|
+
window.document.cookie = encodeURIComponent(b) + "=" + g + ";";
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
function ee() {
|
|
74
74
|
var h;
|
|
75
|
-
if (!(typeof window === n || !
|
|
75
|
+
if (!(typeof window === n || !b)) {
|
|
76
76
|
try {
|
|
77
|
-
h = window.localStorage[
|
|
77
|
+
h = window.localStorage[b];
|
|
78
78
|
} catch {
|
|
79
79
|
}
|
|
80
80
|
if (typeof h === n)
|
|
81
81
|
try {
|
|
82
|
-
var g = window.document.cookie, O = encodeURIComponent(
|
|
82
|
+
var g = window.document.cookie, O = encodeURIComponent(b), ne = g.indexOf(O + "=");
|
|
83
83
|
ne !== -1 && (h = /^([^;]+)/.exec(
|
|
84
84
|
g.slice(ne + O.length + 1)
|
|
85
85
|
)[1]);
|
|
@@ -89,13 +89,13 @@ function Je() {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
function Re() {
|
|
92
|
-
if (!(typeof window === n || !
|
|
92
|
+
if (!(typeof window === n || !b)) {
|
|
93
93
|
try {
|
|
94
|
-
window.localStorage.removeItem(
|
|
94
|
+
window.localStorage.removeItem(b);
|
|
95
95
|
} catch {
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
|
-
window.document.cookie = encodeURIComponent(
|
|
98
|
+
window.document.cookie = encodeURIComponent(b) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -113,7 +113,7 @@ function Je() {
|
|
|
113
113
|
WARN: 3,
|
|
114
114
|
ERROR: 4,
|
|
115
115
|
SILENT: 5
|
|
116
|
-
}, c.methodFactory = m ||
|
|
116
|
+
}, c.methodFactory = m || _, c.getLevel = function() {
|
|
117
117
|
return L ?? H ?? j;
|
|
118
118
|
}, c.setLevel = function(h, g) {
|
|
119
119
|
return L = U(h), g !== !1 && Ee(L), p.call(c);
|
|
@@ -485,7 +485,7 @@ function le(t, e, n) {
|
|
|
485
485
|
function ye(t, e, n = !1) {
|
|
486
486
|
return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? le(t.mtls_endpoint_aliases[e], e, n) : le(t[e], e, n);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function _e(t, e) {
|
|
489
489
|
return !!(t.use_mtls_endpoint_aliases || e?.[He]);
|
|
490
490
|
}
|
|
491
491
|
function q(t) {
|
|
@@ -507,7 +507,7 @@ async function ft(t, e, n, o, s, r) {
|
|
|
507
507
|
}
|
|
508
508
|
async function pt(t, e, n, o) {
|
|
509
509
|
C(t), I(e);
|
|
510
|
-
const s = ye(t, "userinfo_endpoint",
|
|
510
|
+
const s = ye(t, "userinfo_endpoint", _e(e, o)), r = W(o?.headers);
|
|
511
511
|
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ft(n, "GET", s, r, null, {
|
|
512
512
|
...o,
|
|
513
513
|
[N]: K(e)
|
|
@@ -522,8 +522,8 @@ async function wt(t, e, n, o, s, r, i) {
|
|
|
522
522
|
signal: null
|
|
523
523
|
}).then(Y);
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
526
|
-
const r = ye(t, "token_endpoint",
|
|
525
|
+
async function be(t, e, n, o, s) {
|
|
526
|
+
const r = ye(t, "token_endpoint", _e(e, s));
|
|
527
527
|
o.set("grant_type", n);
|
|
528
528
|
const i = W(s?.headers);
|
|
529
529
|
return i.set("accept", "application/json"), wt(t, e, "POST", r, o, i, s);
|
|
@@ -532,7 +532,7 @@ async function de(t, e, n, o) {
|
|
|
532
532
|
if (C(t), I(e), !w(n))
|
|
533
533
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
534
534
|
const s = new URLSearchParams(o?.additionalParameters);
|
|
535
|
-
return s.set("refresh_token", n),
|
|
535
|
+
return s.set("refresh_token", n), be(t, e, "refresh_token", s, o);
|
|
536
536
|
}
|
|
537
537
|
const ve = /* @__PURE__ */ new WeakMap();
|
|
538
538
|
function mt(t) {
|
|
@@ -608,10 +608,10 @@ function yt(t, e) {
|
|
|
608
608
|
return e;
|
|
609
609
|
}
|
|
610
610
|
const Te = /* @__PURE__ */ new WeakSet();
|
|
611
|
-
function
|
|
611
|
+
function _t(t) {
|
|
612
612
|
return Te.add(t), t;
|
|
613
613
|
}
|
|
614
|
-
async function
|
|
614
|
+
async function bt(t, e, n, o, s, r) {
|
|
615
615
|
if (C(t), I(e), !Te.has(n))
|
|
616
616
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
617
617
|
if (!w(o))
|
|
@@ -622,7 +622,7 @@ async function _t(t, e, n, o, s, r) {
|
|
|
622
622
|
if (!i)
|
|
623
623
|
throw new a('no authorization code in "callbackParameters"');
|
|
624
624
|
const u = new URLSearchParams(r?.additionalParameters);
|
|
625
|
-
return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i),
|
|
625
|
+
return u.set("redirect_uri", o), u.set("code_verifier", s), u.set("code", i), be(t, e, "authorization_code", u, r);
|
|
626
626
|
}
|
|
627
627
|
const vt = {
|
|
628
628
|
aud: "audience",
|
|
@@ -764,8 +764,8 @@ async function Pt(t, e, n, o, s, r) {
|
|
|
764
764
|
if (e(p), p.crit !== void 0)
|
|
765
765
|
throw new a('unexpected JWT "crit" header parameter');
|
|
766
766
|
const k = A(d);
|
|
767
|
-
let
|
|
768
|
-
n !== ke && (
|
|
767
|
+
let _;
|
|
768
|
+
n !== ke && (_ = await n(p), await Rt(i, u, _, k));
|
|
769
769
|
let f;
|
|
770
770
|
try {
|
|
771
771
|
f = JSON.parse(E(A(u)));
|
|
@@ -793,7 +793,7 @@ async function Pt(t, e, n, o, s, r) {
|
|
|
793
793
|
}
|
|
794
794
|
if (f.aud !== void 0 && typeof f.aud != "string" && !Array.isArray(f.aud))
|
|
795
795
|
throw new a('unexpected JWT "aud" (audience) claim type');
|
|
796
|
-
return { header: p, claims: f, signature: k, key:
|
|
796
|
+
return { header: p, claims: f, signature: k, key: _, jwt: t };
|
|
797
797
|
}
|
|
798
798
|
function Lt(t, e, n) {
|
|
799
799
|
if (t !== void 0) {
|
|
@@ -852,7 +852,7 @@ function Ct(t, e, n, o) {
|
|
|
852
852
|
const u = T(n, "id_token"), d = T(n, "token");
|
|
853
853
|
if (u !== void 0 || d !== void 0)
|
|
854
854
|
throw new v("implicit and hybrid flows are not supported");
|
|
855
|
-
return
|
|
855
|
+
return _t(new URLSearchParams(n));
|
|
856
856
|
}
|
|
857
857
|
const F = "code-verifier", M = "oauth-state", pe = "/oauth/callback";
|
|
858
858
|
class It extends Ie {
|
|
@@ -911,23 +911,20 @@ class It extends Ie {
|
|
|
911
911
|
providerData: n
|
|
912
912
|
});
|
|
913
913
|
}
|
|
914
|
-
async signUp({
|
|
915
|
-
redirectTo:
|
|
916
|
-
replace:
|
|
914
|
+
async signUp(e, {
|
|
915
|
+
redirectTo: n,
|
|
916
|
+
replace: o = !1
|
|
917
917
|
} = {}) {
|
|
918
918
|
return this.authorize({
|
|
919
|
-
redirectTo: this.redirectToAfterSignUp ??
|
|
920
|
-
replace:
|
|
919
|
+
redirectTo: this.redirectToAfterSignUp ?? n ?? "/",
|
|
920
|
+
replace: o,
|
|
921
921
|
isSignUp: !0
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
|
-
async signIn({
|
|
925
|
-
redirectTo: e,
|
|
926
|
-
replace: n = !1
|
|
927
|
-
} = {}) {
|
|
924
|
+
async signIn(e, { redirectTo: n, replace: o = !1 }) {
|
|
928
925
|
return this.authorize({
|
|
929
|
-
redirectTo: this.redirectToAfterSignIn ??
|
|
930
|
-
replace:
|
|
926
|
+
redirectTo: this.redirectToAfterSignIn ?? n ?? "/",
|
|
927
|
+
replace: o
|
|
931
928
|
});
|
|
932
929
|
}
|
|
933
930
|
async authorize({
|
|
@@ -945,7 +942,7 @@ class It extends Ie {
|
|
|
945
942
|
);
|
|
946
943
|
sessionStorage.setItem("redirect-to", e);
|
|
947
944
|
const y = new URL(window.location.origin);
|
|
948
|
-
y.pathname = this.callbackUrlPath, y.search = "", d.searchParams.set("client_id", this.client.client_id), d.searchParams.set("redirect_uri", y.toString()), d.searchParams.set("response_type", "code"), d.searchParams.set("scope", this.scopes.join(" ")), d.searchParams.set("code_challenge", u), d.searchParams.set(
|
|
945
|
+
y.pathname = this.callbackUrlPath, y.search = "", y.hash = "", d.searchParams.set("client_id", this.client.client_id), d.searchParams.set("redirect_uri", y.toString()), d.searchParams.set("response_type", "code"), d.searchParams.set("scope", this.scopes.join(" ")), d.searchParams.set("code_challenge", u), d.searchParams.set(
|
|
949
946
|
"code_challenge_method",
|
|
950
947
|
s
|
|
951
948
|
), this.audience && d.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(d, {
|
|
@@ -987,22 +984,22 @@ class It extends Ie {
|
|
|
987
984
|
const n = await this.getAccessToken();
|
|
988
985
|
return e.headers.set("Authorization", `Bearer ${n}`), e;
|
|
989
986
|
};
|
|
990
|
-
signOut = async () => {
|
|
987
|
+
signOut = async (e) => {
|
|
991
988
|
S.setState({
|
|
992
989
|
isAuthenticated: !1,
|
|
993
990
|
isPending: !1,
|
|
994
991
|
profile: void 0,
|
|
995
992
|
providerData: void 0
|
|
996
993
|
});
|
|
997
|
-
const
|
|
994
|
+
const n = await this.getAuthServer(), o = new URL(
|
|
998
995
|
window.location.origin + this.redirectToAfterSignOut
|
|
999
996
|
);
|
|
1000
|
-
|
|
1001
|
-
let
|
|
1002
|
-
|
|
997
|
+
o.pathname = this.callbackUrlPath;
|
|
998
|
+
let s;
|
|
999
|
+
n.end_session_endpoint ? (s = new URL(n.end_session_endpoint), s.searchParams.set(
|
|
1003
1000
|
"post_logout_redirect_uri",
|
|
1004
|
-
|
|
1005
|
-
)) :
|
|
1001
|
+
o.toString()
|
|
1002
|
+
)) : s = o;
|
|
1006
1003
|
};
|
|
1007
1004
|
onPageLoad = async () => {
|
|
1008
1005
|
const { providerData: e } = S.getState();
|
|
@@ -1065,8 +1062,8 @@ class It extends Ie {
|
|
|
1065
1062
|
i
|
|
1066
1063
|
);
|
|
1067
1064
|
const u = new URL(e);
|
|
1068
|
-
u.pathname = this.callbackUrlPath, u.search = "";
|
|
1069
|
-
const d = await
|
|
1065
|
+
u.pathname = this.callbackUrlPath, u.search = "", u.hash = "";
|
|
1066
|
+
const d = await bt(
|
|
1070
1067
|
r,
|
|
1071
1068
|
this.client,
|
|
1072
1069
|
i,
|
|
@@ -1078,16 +1075,16 @@ class It extends Ie {
|
|
|
1078
1075
|
d
|
|
1079
1076
|
);
|
|
1080
1077
|
this.setTokensFromResponse(y);
|
|
1081
|
-
const p = await this.getAccessToken(),
|
|
1078
|
+
const p = await this.getAccessToken(), _ = await (await pt(
|
|
1082
1079
|
r,
|
|
1083
1080
|
this.client,
|
|
1084
1081
|
p
|
|
1085
1082
|
)).json(), f = {
|
|
1086
|
-
sub:
|
|
1087
|
-
email:
|
|
1088
|
-
name:
|
|
1089
|
-
emailVerified:
|
|
1090
|
-
pictureUrl:
|
|
1083
|
+
sub: _.sub,
|
|
1084
|
+
email: _.email,
|
|
1085
|
+
name: _.name,
|
|
1086
|
+
emailVerified: _.email_verified ?? !1,
|
|
1087
|
+
pictureUrl: _.picture
|
|
1091
1088
|
};
|
|
1092
1089
|
S.setState({
|
|
1093
1090
|
isAuthenticated: !0,
|