@civic/auth 0.0.1-beta.28 → 0.0.1-beta.29
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint.log +14 -0
- package/.turbo/turbo-test.log +1678 -0
- package/civic-auth-0.0.1-beta.15.tgz +0 -0
- package/civic-auth-0.0.1-beta.17.tgz +0 -0
- package/dist/AuthProvider-BYZ8w92b.d.mts +15 -0
- package/dist/AuthProvider-BgOwv9h8.d.ts +15 -0
- package/dist/AuthProvider-Bj_Prt1x.d.ts +21 -0
- package/dist/AuthProvider-DUAoX4G9.d.mts +21 -0
- package/dist/UserProvider-BA2uflVB.d.ts +16 -0
- package/dist/UserProvider-Bl3j1PUO.d.mts +16 -0
- package/dist/UserProvider-CMLaYOUD.d.ts +16 -0
- package/dist/UserProvider-Cbm8MZkJ.d.mts +16 -0
- package/dist/chunk-4PLCDPEN.mjs +599 -0
- package/dist/chunk-4PLCDPEN.mjs.map +1 -0
- package/dist/chunk-5UQQYXCX.js +1 -0
- package/dist/chunk-5UQQYXCX.js.map +1 -0
- package/dist/chunk-63YGK3A7.mjs +223 -0
- package/dist/chunk-63YGK3A7.mjs.map +1 -0
- package/dist/chunk-6RFRDWIP.js +223 -0
- package/dist/chunk-6RFRDWIP.js.map +1 -0
- package/dist/chunk-7K3QN2AT.js +599 -0
- package/dist/chunk-7K3QN2AT.js.map +1 -0
- package/dist/chunk-AM2Y662I.js +601 -0
- package/dist/chunk-AM2Y662I.js.map +1 -0
- package/dist/chunk-AP4627CS.mjs +223 -0
- package/dist/chunk-AP4627CS.mjs.map +1 -0
- package/dist/chunk-CRTRMMJ7.js +59 -0
- package/dist/chunk-CRTRMMJ7.js.map +1 -0
- package/dist/chunk-CTVJJBBA.js +118 -0
- package/dist/chunk-CTVJJBBA.js.map +1 -0
- package/dist/chunk-EKLYHP2D.mjs +711 -0
- package/dist/chunk-EKLYHP2D.mjs.map +1 -0
- package/dist/chunk-FHRZSX3C.js +710 -0
- package/dist/chunk-FHRZSX3C.js.map +1 -0
- package/dist/chunk-GB3H3I47.js +711 -0
- package/dist/chunk-GB3H3I47.js.map +1 -0
- package/dist/chunk-JDZPCA3P.js +173 -0
- package/dist/chunk-JDZPCA3P.js.map +1 -0
- package/dist/chunk-JEOPLLWO.js +223 -0
- package/dist/chunk-JEOPLLWO.js.map +1 -0
- package/dist/chunk-MK7557NR.mjs +118 -0
- package/dist/chunk-MK7557NR.mjs.map +1 -0
- package/dist/chunk-NLRREFOX.mjs +710 -0
- package/dist/chunk-NLRREFOX.mjs.map +1 -0
- package/dist/chunk-O3WGNLRO.mjs +173 -0
- package/dist/chunk-O3WGNLRO.mjs.map +1 -0
- package/dist/chunk-OXXUQ36U.mjs +283 -0
- package/dist/chunk-OXXUQ36U.mjs.map +1 -0
- package/dist/chunk-PMJAV4JJ.mjs +1 -0
- package/dist/chunk-PMJAV4JJ.mjs.map +1 -0
- package/dist/chunk-Q7DSPTUG.mjs +601 -0
- package/dist/chunk-Q7DSPTUG.mjs.map +1 -0
- package/dist/chunk-RGHW4PYM.mjs +59 -0
- package/dist/chunk-RGHW4PYM.mjs.map +1 -0
- package/dist/chunk-TH6FI2XI.js +283 -0
- package/dist/chunk-TH6FI2XI.js.map +1 -0
- package/dist/cjs/src/browser/storage.d.ts +2 -2
- package/dist/cjs/src/browser/storage.d.ts.map +1 -1
- package/dist/cjs/src/browser/storage.js +3 -3
- package/dist/cjs/src/browser/storage.js.map +1 -1
- package/dist/cjs/src/nextjs/GetUser.d.ts +1 -1
- package/dist/cjs/src/nextjs/GetUser.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/GetUser.js +3 -3
- package/dist/cjs/src/nextjs/GetUser.js.map +1 -1
- package/dist/cjs/src/nextjs/config.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/config.js +0 -2
- package/dist/cjs/src/nextjs/config.js.map +1 -1
- package/dist/cjs/src/nextjs/cookies.d.ts +4 -4
- package/dist/cjs/src/nextjs/cookies.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/cookies.js +14 -11
- package/dist/cjs/src/nextjs/cookies.js.map +1 -1
- package/dist/cjs/src/nextjs/routeHandler.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/routeHandler.js +1 -5
- package/dist/cjs/src/nextjs/routeHandler.js.map +1 -1
- package/dist/cjs/src/reactjs/hooks/index.d.ts +0 -1
- package/dist/cjs/src/reactjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/src/reactjs/hooks/index.js +1 -3
- package/dist/cjs/src/reactjs/hooks/index.js.map +1 -1
- package/dist/cjs/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
- package/dist/cjs/src/server/ServerAuthenticationResolver.js +2 -7
- package/dist/cjs/src/server/ServerAuthenticationResolver.js.map +1 -1
- package/dist/cjs/src/server/login.d.ts +1 -1
- package/dist/cjs/src/server/login.d.ts.map +1 -1
- package/dist/cjs/src/server/login.js +2 -2
- package/dist/cjs/src/server/login.js.map +1 -1
- package/dist/cjs/src/services/AuthenticationService.d.ts.map +1 -1
- package/dist/cjs/src/services/AuthenticationService.js +6 -16
- package/dist/cjs/src/services/AuthenticationService.js.map +1 -1
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js +0 -2
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
- package/dist/cjs/src/shared/lib/UserSession.d.ts +4 -4
- package/dist/cjs/src/shared/lib/UserSession.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/UserSession.js +4 -4
- package/dist/cjs/src/shared/lib/UserSession.js.map +1 -1
- package/dist/cjs/src/shared/lib/session.js +1 -1
- package/dist/cjs/src/shared/lib/session.js.map +1 -1
- package/dist/cjs/src/shared/lib/storage.d.ts +2 -2
- package/dist/cjs/src/shared/lib/storage.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/storage.js.map +1 -1
- package/dist/cjs/src/shared/lib/util.d.ts +4 -4
- package/dist/cjs/src/shared/lib/util.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/util.js +16 -15
- package/dist/cjs/src/shared/lib/util.js.map +1 -1
- package/dist/cjs/src/types.d.ts +2 -2
- package/dist/cjs/src/types.d.ts.map +1 -1
- package/dist/cjs/src/types.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/browser/storage.d.ts +2 -2
- package/dist/esm/src/browser/storage.d.ts.map +1 -1
- package/dist/esm/src/browser/storage.js +3 -3
- package/dist/esm/src/browser/storage.js.map +1 -1
- package/dist/esm/src/nextjs/GetUser.d.ts +1 -1
- package/dist/esm/src/nextjs/GetUser.d.ts.map +1 -1
- package/dist/esm/src/nextjs/GetUser.js +3 -3
- package/dist/esm/src/nextjs/GetUser.js.map +1 -1
- package/dist/esm/src/nextjs/config.d.ts.map +1 -1
- package/dist/esm/src/nextjs/config.js +0 -2
- package/dist/esm/src/nextjs/config.js.map +1 -1
- package/dist/esm/src/nextjs/cookies.d.ts +4 -4
- package/dist/esm/src/nextjs/cookies.d.ts.map +1 -1
- package/dist/esm/src/nextjs/cookies.js +14 -11
- package/dist/esm/src/nextjs/cookies.js.map +1 -1
- package/dist/esm/src/nextjs/routeHandler.d.ts.map +1 -1
- package/dist/esm/src/nextjs/routeHandler.js +1 -5
- package/dist/esm/src/nextjs/routeHandler.js.map +1 -1
- package/dist/esm/src/reactjs/hooks/index.d.ts +0 -1
- package/dist/esm/src/reactjs/hooks/index.d.ts.map +1 -1
- package/dist/esm/src/reactjs/hooks/index.js +0 -1
- package/dist/esm/src/reactjs/hooks/index.js.map +1 -1
- package/dist/esm/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
- package/dist/esm/src/server/ServerAuthenticationResolver.js +2 -7
- package/dist/esm/src/server/ServerAuthenticationResolver.js.map +1 -1
- package/dist/esm/src/server/login.d.ts +1 -1
- package/dist/esm/src/server/login.d.ts.map +1 -1
- package/dist/esm/src/server/login.js +2 -2
- package/dist/esm/src/server/login.js.map +1 -1
- package/dist/esm/src/services/AuthenticationService.d.ts.map +1 -1
- package/dist/esm/src/services/AuthenticationService.js +6 -16
- package/dist/esm/src/services/AuthenticationService.js.map +1 -1
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.js +0 -2
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
- package/dist/esm/src/shared/lib/UserSession.d.ts +4 -4
- package/dist/esm/src/shared/lib/UserSession.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/UserSession.js +4 -4
- package/dist/esm/src/shared/lib/UserSession.js.map +1 -1
- package/dist/esm/src/shared/lib/session.js +1 -1
- package/dist/esm/src/shared/lib/session.js.map +1 -1
- package/dist/esm/src/shared/lib/storage.d.ts +2 -2
- package/dist/esm/src/shared/lib/storage.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/storage.js.map +1 -1
- package/dist/esm/src/shared/lib/util.d.ts +4 -4
- package/dist/esm/src/shared/lib/util.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/util.js +16 -15
- package/dist/esm/src/shared/lib/util.js.map +1 -1
- package/dist/esm/src/types.d.ts +2 -2
- package/dist/esm/src/types.d.ts.map +1 -1
- package/dist/esm/src/types.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/index.css +340 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/dist/nextjs/client.css +340 -0
- package/dist/nextjs/client.css.map +1 -0
- package/dist/nextjs/client.d.mts +10 -0
- package/dist/nextjs/client.d.ts +10 -0
- package/dist/nextjs/client.js +185 -0
- package/dist/nextjs/client.js.map +1 -0
- package/dist/nextjs/client.mjs +185 -0
- package/dist/nextjs/client.mjs.map +1 -0
- package/dist/nextjs.d.mts +267 -0
- package/dist/nextjs.d.ts +267 -0
- package/dist/nextjs.js +315 -0
- package/dist/nextjs.js.map +1 -0
- package/dist/nextjs.mjs +315 -0
- package/dist/nextjs.mjs.map +1 -0
- package/dist/react.d.mts +65 -0
- package/dist/react.d.ts +65 -0
- package/dist/react.js +226 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +226 -0
- package/dist/react.mjs.map +1 -0
- package/dist/server.d.mts +35 -0
- package/dist/server.d.ts +35 -0
- package/dist/server.js +20 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +20 -0
- package/dist/server.mjs.map +1 -0
- package/dist/src/shared/components/LoadingIcon.d.ts.map +1 -1
- package/dist/src/shared/components/LoadingIcon.js +0 -6
- package/dist/src/shared/components/LoadingIcon.js.map +1 -1
- package/dist/storage-ANmRwpZ3.d.ts +25 -0
- package/dist/storage-B2eAQNdv.d.ts +25 -0
- package/dist/storage-BJPUpxhm.d.mts +25 -0
- package/dist/storage-BJyqsZwC.d.mts +25 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types-Bqm9OCZN.d.mts +22 -0
- package/dist/types-Bqm9OCZN.d.ts +22 -0
- package/dist/types-BxAubCqO.d.mts +58 -0
- package/dist/types-BxAubCqO.d.ts +58 -0
- package/dist/types-DOfl9w7j.d.mts +23 -0
- package/dist/types-DOfl9w7j.d.ts +23 -0
- package/dist/types-HdCjGldB.d.mts +58 -0
- package/dist/types-HdCjGldB.d.ts +58 -0
- package/package.json +1 -1
- package/src/browser/storage.ts +3 -3
- package/src/nextjs/GetUser.ts +3 -3
- package/src/nextjs/config.ts +0 -2
- package/src/nextjs/cookies.ts +14 -18
- package/src/nextjs/routeHandler.ts +1 -5
- package/src/reactjs/hooks/index.ts +0 -1
- package/src/server/ServerAuthenticationResolver.ts +2 -7
- package/src/server/login.ts +2 -2
- package/src/services/AuthenticationService.ts +6 -16
- package/src/shared/components/CivicAuthIframeContainer.tsx +0 -4
- package/src/shared/lib/GenericAuthenticationRefresher.ts +3 -8
- package/src/shared/lib/UserSession.ts +6 -6
- package/src/shared/lib/session.ts +1 -1
- package/src/shared/lib/storage.ts +2 -2
- package/src/shared/lib/util.ts +21 -18
- package/src/types.ts +2 -2
- package/test/unit/nextjs/getUser.test.ts +8 -8
- package/test/unit/publicApi/__snapshots__/apiSnapshot.test.ts.snap +0 -7
- package/test/unit/server/login.test.ts +20 -18
- package/test/unit/server/session.test.ts +4 -4
- package/test/unit/services/AuthenticationService.test.ts +3 -3
- package/test/unit/services/ServerAuthenticationResolver.test.ts +11 -6
- package/test/unit/shared/GenericAuthenticationRefresher.test.ts +4 -4
- package/test/unit/shared/UserSession.test.ts +6 -6
- package/test/unit/shared/storage.test.ts +6 -6
- package/dist/cjs/src/nextjs/client/index.d.ts +0 -2
- package/dist/cjs/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/cjs/src/nextjs/client/index.js +0 -6
- package/dist/cjs/src/nextjs/client/index.js.map +0 -1
- package/dist/cjs/src/styles.css +0 -387
- package/dist/esm/src/nextjs/client/index.d.ts +0 -2
- package/dist/esm/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/esm/src/nextjs/client/index.js +0 -2
- package/dist/esm/src/nextjs/client/index.js.map +0 -1
- package/dist/esm/src/styles.css +0 -387
- package/dist/src/nextjs/client/index.d.ts +0 -2
- package/dist/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/src/nextjs/client/index.js +0 -2
- package/dist/src/nextjs/client/index.js.map +0 -1
- package/dist/test/unit/nextjs/routeHandler.test.d.ts +0 -2
- package/dist/test/unit/nextjs/routeHandler.test.d.ts.map +0 -1
- package/dist/test/unit/nextjs/routeHandler.test.js +0 -271
- package/dist/test/unit/nextjs/routeHandler.test.js.map +0 -1
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__async,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-RGHW4PYM.mjs";
|
|
6
|
+
|
|
7
|
+
// src/shared/types.ts
|
|
8
|
+
var OAuthTokens = /* @__PURE__ */ ((OAuthTokens2) => {
|
|
9
|
+
OAuthTokens2["ID_TOKEN"] = "id_token";
|
|
10
|
+
OAuthTokens2["ACCESS_TOKEN"] = "access_token";
|
|
11
|
+
OAuthTokens2["REFRESH_TOKEN"] = "refresh_token";
|
|
12
|
+
return OAuthTokens2;
|
|
13
|
+
})(OAuthTokens || {});
|
|
14
|
+
|
|
15
|
+
// src/shared/util.ts
|
|
16
|
+
import { OAuth2Client } from "oslo/oauth2";
|
|
17
|
+
|
|
18
|
+
// src/lib/oauth.ts
|
|
19
|
+
import { v4 as uuid } from "uuid";
|
|
20
|
+
var getIssuerVariations = (issuer) => {
|
|
21
|
+
const issuerWithoutSlash = issuer.endsWith("/") ? issuer.slice(0, issuer.length - 1) : issuer;
|
|
22
|
+
const issuerWithSlash = `${issuerWithoutSlash}/`;
|
|
23
|
+
return [issuerWithoutSlash, issuerWithSlash];
|
|
24
|
+
};
|
|
25
|
+
var addSlashIfNeeded = (url) => url.endsWith("/") ? url : `${url}/`;
|
|
26
|
+
var getOauthEndpoints = (oauthServer) => __async(void 0, null, function* () {
|
|
27
|
+
const openIdConfigResponse = yield fetch(
|
|
28
|
+
`${addSlashIfNeeded(oauthServer)}.well-known/openid-configuration`
|
|
29
|
+
);
|
|
30
|
+
const openIdConfig = yield openIdConfigResponse.json();
|
|
31
|
+
return {
|
|
32
|
+
jwks: openIdConfig.jwks_uri,
|
|
33
|
+
auth: openIdConfig.authorization_endpoint,
|
|
34
|
+
token: openIdConfig.token_endpoint,
|
|
35
|
+
userinfo: openIdConfig.userinfo_endpoint
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
var generateState = (displayMode, serverTokenExchange) => {
|
|
39
|
+
const jsonString = JSON.stringify(__spreadValues({
|
|
40
|
+
uuid: uuid(),
|
|
41
|
+
displayMode
|
|
42
|
+
}, serverTokenExchange ? { serverTokenExchange } : {}));
|
|
43
|
+
return btoa(jsonString);
|
|
44
|
+
};
|
|
45
|
+
var displayModeFromState = (state, sessionDisplayMode) => {
|
|
46
|
+
try {
|
|
47
|
+
const jsonString = atob(state);
|
|
48
|
+
return JSON.parse(jsonString).displayMode;
|
|
49
|
+
} catch (e) {
|
|
50
|
+
console.error("Failed to parse displayMode from state:", state);
|
|
51
|
+
return sessionDisplayMode;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var serverTokenExchangeFromState = (state) => {
|
|
55
|
+
try {
|
|
56
|
+
const jsonString = atob(state);
|
|
57
|
+
return JSON.parse(jsonString).serverTokenExchange;
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.error("Failed to parse serverTokenExchange from state:", state);
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// src/shared/util.ts
|
|
65
|
+
import * as jose from "jose";
|
|
66
|
+
|
|
67
|
+
// src/utils.ts
|
|
68
|
+
import { clsx } from "clsx";
|
|
69
|
+
import { twMerge } from "tailwind-merge";
|
|
70
|
+
var cn = (...inputs) => {
|
|
71
|
+
return twMerge(clsx(inputs));
|
|
72
|
+
};
|
|
73
|
+
var withoutUndefined = (obj) => {
|
|
74
|
+
const result = {};
|
|
75
|
+
for (const key in obj) {
|
|
76
|
+
if (obj[key] !== void 0) {
|
|
77
|
+
result[key] = obj[key];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/lib/jwt.ts
|
|
84
|
+
var convertForwardedTokenFormat = (inputTokens) => Object.fromEntries(
|
|
85
|
+
Object.entries(inputTokens).map(([source, tokens]) => [
|
|
86
|
+
source,
|
|
87
|
+
{
|
|
88
|
+
idToken: tokens == null ? void 0 : tokens.id_token,
|
|
89
|
+
accessToken: tokens == null ? void 0 : tokens.access_token,
|
|
90
|
+
refreshToken: tokens == null ? void 0 : tokens.refresh_token
|
|
91
|
+
}
|
|
92
|
+
])
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
// src/shared/UserSession.ts
|
|
96
|
+
var GenericUserSession = class {
|
|
97
|
+
constructor(storage) {
|
|
98
|
+
this.storage = storage;
|
|
99
|
+
}
|
|
100
|
+
get() {
|
|
101
|
+
const user = this.storage.get("user" /* USER */);
|
|
102
|
+
return user ? JSON.parse(user) : null;
|
|
103
|
+
}
|
|
104
|
+
set(user) {
|
|
105
|
+
const forwardedTokens = (user == null ? void 0 : user.forwardedTokens) ? convertForwardedTokenFormat(user == null ? void 0 : user.forwardedTokens) : null;
|
|
106
|
+
const value = user ? JSON.stringify(__spreadProps(__spreadValues({}, user), { forwardedTokens })) : "";
|
|
107
|
+
this.storage.set("user" /* USER */, value);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// src/shared/util.ts
|
|
112
|
+
function deriveCodeChallenge(codeVerifier, method = "S256") {
|
|
113
|
+
return __async(this, null, function* () {
|
|
114
|
+
if (method === "Plain") {
|
|
115
|
+
console.warn("Using insecure plain code challenge method");
|
|
116
|
+
return codeVerifier;
|
|
117
|
+
}
|
|
118
|
+
const encoder = new TextEncoder();
|
|
119
|
+
const data = encoder.encode(codeVerifier);
|
|
120
|
+
const digest = yield crypto.subtle.digest("SHA-256", data);
|
|
121
|
+
return btoa(String.fromCharCode(...new Uint8Array(digest))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function getEndpointsWithOverrides(_0) {
|
|
125
|
+
return __async(this, arguments, function* (oauthServer, endpointOverrides = {}) {
|
|
126
|
+
const endpoints = yield getOauthEndpoints(oauthServer);
|
|
127
|
+
return __spreadValues(__spreadValues({}, endpoints), endpointOverrides);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function generateOauthLoginUrl(config) {
|
|
131
|
+
return __async(this, null, function* () {
|
|
132
|
+
const endpoints = yield getEndpointsWithOverrides(
|
|
133
|
+
config.oauthServer,
|
|
134
|
+
config.endpointOverrides
|
|
135
|
+
);
|
|
136
|
+
const oauth2Client = buildOauth2Client(
|
|
137
|
+
config.clientId,
|
|
138
|
+
config.redirectUrl,
|
|
139
|
+
endpoints
|
|
140
|
+
);
|
|
141
|
+
const challenge = yield config.pkceConsumer.getCodeChallenge();
|
|
142
|
+
const oAuthUrl = yield oauth2Client.createAuthorizationURL({
|
|
143
|
+
state: config.state,
|
|
144
|
+
scopes: config.scopes
|
|
145
|
+
});
|
|
146
|
+
oAuthUrl.searchParams.append("code_challenge", challenge);
|
|
147
|
+
oAuthUrl.searchParams.append("code_challenge_method", "S256");
|
|
148
|
+
if (config.nonce) {
|
|
149
|
+
oAuthUrl.searchParams.append("nonce", config.nonce);
|
|
150
|
+
}
|
|
151
|
+
oAuthUrl.searchParams.append("prompt", "consent");
|
|
152
|
+
console.log("Generated OAuth URL", oAuthUrl.toString());
|
|
153
|
+
return oAuthUrl;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function generateOauthLogoutUrl(config) {
|
|
157
|
+
return __async(this, null, function* () {
|
|
158
|
+
return new URL("http://localhost");
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function buildOauth2Client(clientId, redirectUri, endpoints) {
|
|
162
|
+
return new OAuth2Client(clientId, endpoints.auth, endpoints.token, {
|
|
163
|
+
redirectURI: redirectUri
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function exchangeTokens(code, state, pkceProducer, oauth2Client, oauthServer, endpoints) {
|
|
167
|
+
return __async(this, null, function* () {
|
|
168
|
+
const codeVerifier = yield pkceProducer.getCodeVerifier();
|
|
169
|
+
if (!codeVerifier) throw new Error("Code verifier not found in state");
|
|
170
|
+
const tokens = yield oauth2Client.validateAuthorizationCode(code, {
|
|
171
|
+
codeVerifier
|
|
172
|
+
});
|
|
173
|
+
try {
|
|
174
|
+
yield validateOauth2Tokens(tokens, endpoints, oauth2Client, oauthServer);
|
|
175
|
+
} catch (error) {
|
|
176
|
+
console.error("tokenExchange error", { error, tokens });
|
|
177
|
+
throw new Error(
|
|
178
|
+
`OIDC tokens validation failed: ${error.message}`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
return tokens;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function storeTokens(storage, tokens) {
|
|
185
|
+
storage.set("id_token" /* ID_TOKEN */, tokens.id_token);
|
|
186
|
+
storage.set("access_token" /* ACCESS_TOKEN */, tokens.access_token);
|
|
187
|
+
if (tokens.refresh_token)
|
|
188
|
+
storage.set("refresh_token" /* REFRESH_TOKEN */, tokens.refresh_token);
|
|
189
|
+
}
|
|
190
|
+
function clearTokens(storage) {
|
|
191
|
+
Object.values(OAuthTokens).forEach((cookie) => {
|
|
192
|
+
storage.set(cookie, "");
|
|
193
|
+
});
|
|
194
|
+
Object.values("code_verifier" /* COOKIE_NAME */).forEach((cookie) => {
|
|
195
|
+
storage.set(cookie, "");
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function clearUser(storage) {
|
|
199
|
+
const userSession = new GenericUserSession(storage);
|
|
200
|
+
userSession.set(null);
|
|
201
|
+
}
|
|
202
|
+
function retrieveTokens(storage) {
|
|
203
|
+
const idToken = storage.get("id_token" /* ID_TOKEN */);
|
|
204
|
+
const accessToken = storage.get("access_token" /* ACCESS_TOKEN */);
|
|
205
|
+
const refreshToken = storage.get("refresh_token" /* REFRESH_TOKEN */);
|
|
206
|
+
if (!idToken || !accessToken) return null;
|
|
207
|
+
return {
|
|
208
|
+
id_token: idToken,
|
|
209
|
+
access_token: accessToken,
|
|
210
|
+
refresh_token: refreshToken != null ? refreshToken : void 0
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function validateOauth2Tokens(tokens, endpoints, oauth2Client, issuer) {
|
|
214
|
+
return __async(this, null, function* () {
|
|
215
|
+
const JWKS = jose.createRemoteJWKSet(new URL(endpoints.jwks));
|
|
216
|
+
const idTokenResponse = yield jose.jwtVerify(
|
|
217
|
+
tokens.id_token,
|
|
218
|
+
JWKS,
|
|
219
|
+
{
|
|
220
|
+
issuer: getIssuerVariations(issuer),
|
|
221
|
+
audience: oauth2Client.clientId
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
const accessTokenResponse = yield jose.jwtVerify(
|
|
225
|
+
tokens.access_token,
|
|
226
|
+
JWKS,
|
|
227
|
+
{
|
|
228
|
+
issuer: getIssuerVariations(issuer)
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
return withoutUndefined({
|
|
232
|
+
id_token: idTokenResponse.payload,
|
|
233
|
+
access_token: accessTokenResponse.payload,
|
|
234
|
+
refresh_token: tokens.refresh_token
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/shared/session.ts
|
|
240
|
+
import { parseJWT } from "oslo/jwt";
|
|
241
|
+
function getUser(storage) {
|
|
242
|
+
return __async(this, null, function* () {
|
|
243
|
+
var _a, _b;
|
|
244
|
+
const tokens = retrieveTokens(storage);
|
|
245
|
+
if (!tokens) return null;
|
|
246
|
+
return (_b = (_a = parseJWT(tokens.id_token)) == null ? void 0 : _a.payload) != null ? _b : null;
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// src/constants.ts
|
|
251
|
+
var DEFAULT_SCOPES = [
|
|
252
|
+
"openid",
|
|
253
|
+
"profile",
|
|
254
|
+
"email",
|
|
255
|
+
"forwardedTokens",
|
|
256
|
+
"offline_access"
|
|
257
|
+
];
|
|
258
|
+
var IFRAME_ID = "civic-auth-iframe";
|
|
259
|
+
var DEFAULT_AUTH_SERVER = "https://auth.civic.com/oauth";
|
|
260
|
+
var DEFAULT_OAUTH_GET_PARAMS = ["code", "state", "iss"];
|
|
261
|
+
var TOKEN_EXCHANGE_TRIGGER_TEXT = "sameDomainCodeExchangeRequired";
|
|
262
|
+
var TOKEN_EXCHANGE_SUCCESS_TEXT = "serverSideTokenExchangeSuccess";
|
|
263
|
+
|
|
264
|
+
// src/browser/storage.ts
|
|
265
|
+
var LocalStorageAdapter = class {
|
|
266
|
+
get(key) {
|
|
267
|
+
return localStorage.getItem(key) || "";
|
|
268
|
+
}
|
|
269
|
+
set(key, value) {
|
|
270
|
+
localStorage.setItem(key, value);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
// src/services/PKCE.ts
|
|
275
|
+
import { generateCodeVerifier } from "oslo/oauth2";
|
|
276
|
+
var ConfidentialClientPKCEConsumer = class {
|
|
277
|
+
constructor(pkceChallengeEndpoint) {
|
|
278
|
+
this.pkceChallengeEndpoint = pkceChallengeEndpoint;
|
|
279
|
+
}
|
|
280
|
+
getCodeChallenge() {
|
|
281
|
+
return __async(this, null, function* () {
|
|
282
|
+
const response = yield fetch(
|
|
283
|
+
`${this.pkceChallengeEndpoint}?appUrl=${window.location.origin}`
|
|
284
|
+
);
|
|
285
|
+
const data = yield response.json();
|
|
286
|
+
return data.challenge;
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
var GenericPublicClientPKCEProducer = class {
|
|
291
|
+
constructor(storage) {
|
|
292
|
+
this.storage = storage;
|
|
293
|
+
}
|
|
294
|
+
// if there is already a verifier, return it,
|
|
295
|
+
// If not, create a new one and store it
|
|
296
|
+
getCodeChallenge() {
|
|
297
|
+
return __async(this, null, function* () {
|
|
298
|
+
const verifier = generateCodeVerifier();
|
|
299
|
+
this.storage.set("code_verifier" /* COOKIE_NAME */, verifier);
|
|
300
|
+
return deriveCodeChallenge(verifier);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
// if there is already a verifier, return it,
|
|
304
|
+
getCodeVerifier() {
|
|
305
|
+
return __async(this, null, function* () {
|
|
306
|
+
return this.storage.get("code_verifier" /* COOKIE_NAME */);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
var BrowserPublicClientPKCEProducer = class extends GenericPublicClientPKCEProducer {
|
|
311
|
+
constructor() {
|
|
312
|
+
super(new LocalStorageAdapter());
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// src/services/AuthenticationService.ts
|
|
317
|
+
import { OAuth2Client as OAuth2Client2 } from "oslo/oauth2";
|
|
318
|
+
|
|
319
|
+
// src/services/types.ts
|
|
320
|
+
var PopupError = class _PopupError extends Error {
|
|
321
|
+
constructor(message) {
|
|
322
|
+
super(message);
|
|
323
|
+
Object.setPrototypeOf(this, _PopupError.prototype);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
// src/lib/windowUtil.ts
|
|
328
|
+
var isWindowInIframe = (window2) => {
|
|
329
|
+
var _a;
|
|
330
|
+
if (typeof window2 !== "undefined") {
|
|
331
|
+
try {
|
|
332
|
+
if (((_a = window2 == null ? void 0 : window2.frameElement) == null ? void 0 : _a.id) === "civic-auth-iframe") {
|
|
333
|
+
return true;
|
|
334
|
+
}
|
|
335
|
+
} catch (_e) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return false;
|
|
340
|
+
};
|
|
341
|
+
var removeParamsWithoutReload = (paramsToRemove) => {
|
|
342
|
+
const url = new URL(window.location.href);
|
|
343
|
+
paramsToRemove.forEach((param) => {
|
|
344
|
+
url.searchParams.delete(param);
|
|
345
|
+
});
|
|
346
|
+
try {
|
|
347
|
+
window.history.replaceState({}, "", url);
|
|
348
|
+
} catch (error) {
|
|
349
|
+
console.warn("window.history.replaceState failed", error);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
// src/lib/postMessage.ts
|
|
354
|
+
var validateLoginAppPostMessage = (event, clientId) => {
|
|
355
|
+
const caseEvent = event;
|
|
356
|
+
console.log("caseEvent", caseEvent);
|
|
357
|
+
if (!caseEvent.clientId || !caseEvent.data.url || !caseEvent.source || !caseEvent.type || caseEvent.clientId !== clientId || caseEvent.source !== "civicloginApp") {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
return true;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
// src/services/AuthenticationService.ts
|
|
364
|
+
var BrowserAuthenticationInitiator = class {
|
|
365
|
+
constructor(config) {
|
|
366
|
+
this.postMessageHandler = null;
|
|
367
|
+
this.config = config;
|
|
368
|
+
console.log("BrowserAuthenticationInitiator constructor", this.config);
|
|
369
|
+
}
|
|
370
|
+
handleLoginAppPopupFailed(redirectUrl) {
|
|
371
|
+
return __async(this, null, function* () {
|
|
372
|
+
console.warn(
|
|
373
|
+
"Login app popup failed open a popup, using redirect mode instead...",
|
|
374
|
+
redirectUrl
|
|
375
|
+
);
|
|
376
|
+
window.location.href = redirectUrl;
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
// Use the config (Client ID, scopes OAuth Server, Endpoints, PKCEConsumer) to generate a new login url
|
|
380
|
+
// and then use the display mode to decide how to send the user there
|
|
381
|
+
signIn(iframeRef) {
|
|
382
|
+
return __async(this, null, function* () {
|
|
383
|
+
const url = yield generateOauthLoginUrl(this.config);
|
|
384
|
+
this.postMessageHandler = (event) => {
|
|
385
|
+
const thisURL = new URL(window.location.href);
|
|
386
|
+
if (event.origin.endsWith("civic.com") || thisURL.hostname === "localhost") {
|
|
387
|
+
if (!validateLoginAppPostMessage(event.data, this.config.clientId)) {
|
|
388
|
+
console.log("Received invalid message from login app", event.data);
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
const loginMessage = event.data;
|
|
392
|
+
console.log("Received message from login app", event.data);
|
|
393
|
+
this.handleLoginAppPopupFailed(loginMessage.data.url);
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
window.addEventListener("message", this.postMessageHandler);
|
|
397
|
+
if (this.config.displayMode === "iframe") {
|
|
398
|
+
if (!iframeRef)
|
|
399
|
+
throw new Error("iframeRef is required for displayMode 'iframe'");
|
|
400
|
+
iframeRef.setAttribute("src", url.toString());
|
|
401
|
+
}
|
|
402
|
+
if (this.config.displayMode === "redirect") {
|
|
403
|
+
window.location.href = url.toString();
|
|
404
|
+
}
|
|
405
|
+
if (this.config.displayMode === "new_tab") {
|
|
406
|
+
try {
|
|
407
|
+
const popupWindow = window.open(url.toString(), "_blank");
|
|
408
|
+
console.log("signIn", popupWindow);
|
|
409
|
+
if (!popupWindow) {
|
|
410
|
+
throw new PopupError("Failed to open popup window");
|
|
411
|
+
}
|
|
412
|
+
} catch (error) {
|
|
413
|
+
console.error("popupWindow", error);
|
|
414
|
+
throw new PopupError(
|
|
415
|
+
"window.open has thrown: Failed to open popup window"
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return url;
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
signOut() {
|
|
423
|
+
return __async(this, null, function* () {
|
|
424
|
+
const localStorage2 = new LocalStorageAdapter();
|
|
425
|
+
clearTokens(localStorage2);
|
|
426
|
+
clearUser(localStorage2);
|
|
427
|
+
const url = yield generateOauthLogoutUrl(this.config);
|
|
428
|
+
return url;
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
cleanup() {
|
|
432
|
+
if (this.postMessageHandler) {
|
|
433
|
+
window.removeEventListener("message", this.postMessageHandler);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
var GenericAuthenticationInitiator = class {
|
|
438
|
+
constructor(config) {
|
|
439
|
+
this.config = config;
|
|
440
|
+
console.log("GenericAuthenticationInitiator constructor", {
|
|
441
|
+
config
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
// Use the config (Client ID, scopes OAuth Server, Endpoints, PKCEConsumer) to generate a new login url
|
|
445
|
+
// and simply return the url
|
|
446
|
+
signIn() {
|
|
447
|
+
return __async(this, null, function* () {
|
|
448
|
+
return generateOauthLoginUrl(this.config);
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
signOut() {
|
|
452
|
+
return __async(this, null, function* () {
|
|
453
|
+
return generateOauthLogoutUrl(this.config);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
var BrowserAuthenticationService = class _BrowserAuthenticationService extends BrowserAuthenticationInitiator {
|
|
458
|
+
// TODO WIP - perhaps we want to keep resolver and initiator separate here
|
|
459
|
+
constructor(config, pkceProducer = new BrowserPublicClientPKCEProducer()) {
|
|
460
|
+
console.log("BrowserAuthenticationService constructor", {
|
|
461
|
+
config
|
|
462
|
+
});
|
|
463
|
+
super(__spreadProps(__spreadValues({}, config), {
|
|
464
|
+
state: generateState(config.displayMode),
|
|
465
|
+
// Store and retrieve the PKCE challenge in local storage
|
|
466
|
+
pkceConsumer: pkceProducer
|
|
467
|
+
}));
|
|
468
|
+
this.pkceProducer = pkceProducer;
|
|
469
|
+
}
|
|
470
|
+
// TODO too much code duplication here between the browser and the server variant.
|
|
471
|
+
// Suggestion for refactor: Standardise the config for AuthenticationResolvers and create a one-shot
|
|
472
|
+
// function for generating an oauth2client from it
|
|
473
|
+
init() {
|
|
474
|
+
return __async(this, null, function* () {
|
|
475
|
+
this.endpoints = yield getEndpointsWithOverrides(
|
|
476
|
+
this.config.oauthServer,
|
|
477
|
+
this.config.endpointOverrides
|
|
478
|
+
);
|
|
479
|
+
this.oauth2client = new OAuth2Client2(
|
|
480
|
+
this.config.clientId,
|
|
481
|
+
this.endpoints.auth,
|
|
482
|
+
this.endpoints.token,
|
|
483
|
+
{
|
|
484
|
+
redirectURI: this.config.redirectUrl
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
return this;
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
// Two responsibilities:
|
|
491
|
+
// 1. resolve the auth code to get the tokens (should use library code)
|
|
492
|
+
// 2. store the tokens in local storage
|
|
493
|
+
tokenExchange(code, state) {
|
|
494
|
+
return __async(this, null, function* () {
|
|
495
|
+
if (!this.oauth2client) yield this.init();
|
|
496
|
+
const codeVerifier = yield this.pkceProducer.getCodeVerifier();
|
|
497
|
+
if (!codeVerifier) throw new Error("Code verifier not found in storage");
|
|
498
|
+
const tokens = yield exchangeTokens(
|
|
499
|
+
code,
|
|
500
|
+
state,
|
|
501
|
+
this.pkceProducer,
|
|
502
|
+
this.oauth2client,
|
|
503
|
+
// clean up types here to avoid the ! operator
|
|
504
|
+
this.config.oauthServer,
|
|
505
|
+
this.endpoints
|
|
506
|
+
// clean up types here to avoid the ! operator
|
|
507
|
+
);
|
|
508
|
+
storeTokens(new LocalStorageAdapter(), tokens);
|
|
509
|
+
const parsedDisplayMode = displayModeFromState(
|
|
510
|
+
state,
|
|
511
|
+
this.config.displayMode
|
|
512
|
+
);
|
|
513
|
+
if (parsedDisplayMode === "new_tab") {
|
|
514
|
+
window.close();
|
|
515
|
+
}
|
|
516
|
+
removeParamsWithoutReload(DEFAULT_OAUTH_GET_PARAMS);
|
|
517
|
+
return tokens;
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
// Get the session data from local storage
|
|
521
|
+
getSessionData() {
|
|
522
|
+
return __async(this, null, function* () {
|
|
523
|
+
const storageData = retrieveTokens(new LocalStorageAdapter());
|
|
524
|
+
if (!storageData) return null;
|
|
525
|
+
return {
|
|
526
|
+
authenticated: !!storageData.id_token,
|
|
527
|
+
idToken: storageData.id_token,
|
|
528
|
+
accessToken: storageData.access_token,
|
|
529
|
+
refreshToken: storageData.refresh_token
|
|
530
|
+
};
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
validateExistingSession() {
|
|
534
|
+
return __async(this, null, function* () {
|
|
535
|
+
try {
|
|
536
|
+
const sessionData = yield this.getSessionData();
|
|
537
|
+
if (!(sessionData == null ? void 0 : sessionData.idToken) || !sessionData.accessToken) {
|
|
538
|
+
const unAuthenticatedSession = __spreadProps(__spreadValues({}, sessionData), { authenticated: false });
|
|
539
|
+
clearTokens(new LocalStorageAdapter());
|
|
540
|
+
return unAuthenticatedSession;
|
|
541
|
+
}
|
|
542
|
+
if (!this.endpoints || !this.oauth2client) yield this.init();
|
|
543
|
+
yield validateOauth2Tokens(
|
|
544
|
+
{
|
|
545
|
+
access_token: sessionData.accessToken,
|
|
546
|
+
id_token: sessionData.idToken,
|
|
547
|
+
refresh_token: sessionData.refreshToken
|
|
548
|
+
},
|
|
549
|
+
this.endpoints,
|
|
550
|
+
this.oauth2client,
|
|
551
|
+
this.config.oauthServer
|
|
552
|
+
);
|
|
553
|
+
return sessionData;
|
|
554
|
+
} catch (error) {
|
|
555
|
+
console.warn("Failed to validate existing tokens", error);
|
|
556
|
+
const unAuthenticatedSession = {
|
|
557
|
+
authenticated: false
|
|
558
|
+
};
|
|
559
|
+
clearTokens(new LocalStorageAdapter());
|
|
560
|
+
return unAuthenticatedSession;
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
static build(config) {
|
|
565
|
+
return __async(this, null, function* () {
|
|
566
|
+
const resolver = new _BrowserAuthenticationService(config);
|
|
567
|
+
yield resolver.init();
|
|
568
|
+
return resolver;
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export {
|
|
574
|
+
convertForwardedTokenFormat,
|
|
575
|
+
GenericUserSession,
|
|
576
|
+
DEFAULT_SCOPES,
|
|
577
|
+
IFRAME_ID,
|
|
578
|
+
DEFAULT_AUTH_SERVER,
|
|
579
|
+
TOKEN_EXCHANGE_TRIGGER_TEXT,
|
|
580
|
+
TOKEN_EXCHANGE_SUCCESS_TEXT,
|
|
581
|
+
isWindowInIframe,
|
|
582
|
+
generateState,
|
|
583
|
+
serverTokenExchangeFromState,
|
|
584
|
+
cn,
|
|
585
|
+
withoutUndefined,
|
|
586
|
+
getEndpointsWithOverrides,
|
|
587
|
+
exchangeTokens,
|
|
588
|
+
storeTokens,
|
|
589
|
+
clearTokens,
|
|
590
|
+
retrieveTokens,
|
|
591
|
+
LocalStorageAdapter,
|
|
592
|
+
ConfidentialClientPKCEConsumer,
|
|
593
|
+
GenericPublicClientPKCEProducer,
|
|
594
|
+
BrowserPublicClientPKCEProducer,
|
|
595
|
+
PopupError,
|
|
596
|
+
BrowserAuthenticationInitiator,
|
|
597
|
+
GenericAuthenticationInitiator,
|
|
598
|
+
BrowserAuthenticationService,
|
|
599
|
+
getUser
|
|
600
|
+
};
|
|
601
|
+
//# sourceMappingURL=chunk-Q7DSPTUG.mjs.map
|