@owlmeans/client-auth 0.1.18-rc.4 → 0.1.18-rc.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +280 -37
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/client-auth/SKILL.md +139 -21
- package/build/components/dispatcher/component.d.ts.map +1 -1
- package/build/components/dispatcher/component.js +14 -3
- package/build/components/dispatcher/component.js.map +1 -1
- package/build/entrypoints.d.ts +7 -0
- package/build/entrypoints.d.ts.map +1 -0
- package/build/entrypoints.js +7 -0
- package/build/entrypoints.js.map +1 -0
- package/build/helper.d.ts +2 -1
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +24 -3
- package/build/helper.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/login/adopt.d.ts +24 -0
- package/build/login/adopt.d.ts.map +1 -0
- package/build/login/adopt.js +28 -0
- package/build/login/adopt.js.map +1 -0
- package/build/login/consts.d.ts +49 -0
- package/build/login/consts.d.ts.map +1 -0
- package/build/login/consts.js +49 -0
- package/build/login/consts.js.map +1 -0
- package/build/login/credit.d.ts +24 -0
- package/build/login/credit.d.ts.map +1 -0
- package/build/login/credit.js +58 -0
- package/build/login/credit.js.map +1 -0
- package/build/login/env.d.ts +32 -0
- package/build/login/env.d.ts.map +1 -0
- package/build/login/env.js +84 -0
- package/build/login/env.js.map +1 -0
- package/build/login/flow.d.ts +20 -0
- package/build/login/flow.d.ts.map +1 -0
- package/build/login/flow.js +39 -0
- package/build/login/flow.js.map +1 -0
- package/build/login/hook.d.ts +37 -0
- package/build/login/hook.d.ts.map +1 -0
- package/build/login/hook.js +72 -0
- package/build/login/hook.js.map +1 -0
- package/build/login/i18n/be.json +37 -0
- package/build/login/i18n/de.json +37 -0
- package/build/login/i18n/en.json +37 -0
- package/build/login/i18n/es.json +37 -0
- package/build/login/i18n/fr.json +37 -0
- package/build/login/i18n/pl.json +37 -0
- package/build/login/i18n/ru.json +37 -0
- package/build/login/i18n/uk.json +37 -0
- package/build/login/i18n.d.ts +2 -0
- package/build/login/i18n.d.ts.map +1 -0
- package/build/login/i18n.js +27 -0
- package/build/login/i18n.js.map +1 -0
- package/build/login/index.d.ts +15 -0
- package/build/login/index.d.ts.map +1 -0
- package/build/login/index.js +15 -0
- package/build/login/index.js.map +1 -0
- package/build/login/methods.d.ts +25 -0
- package/build/login/methods.d.ts.map +1 -0
- package/build/login/methods.js +97 -0
- package/build/login/methods.js.map +1 -0
- package/build/login/resume.d.ts +30 -0
- package/build/login/resume.d.ts.map +1 -0
- package/build/login/resume.js +57 -0
- package/build/login/resume.js.map +1 -0
- package/build/login/screen.d.ts +17 -0
- package/build/login/screen.d.ts.map +1 -0
- package/build/login/screen.js +76 -0
- package/build/login/screen.js.map +1 -0
- package/build/login/service.d.ts +31 -0
- package/build/login/service.d.ts.map +1 -0
- package/build/login/service.js +148 -0
- package/build/login/service.js.map +1 -0
- package/build/login/surrogate.d.ts +20 -0
- package/build/login/surrogate.d.ts.map +1 -0
- package/build/login/surrogate.js +33 -0
- package/build/login/surrogate.js.map +1 -0
- package/build/login/terms.d.ts +20 -0
- package/build/login/terms.d.ts.map +1 -0
- package/build/login/terms.js +0 -0
- package/build/login/terms.js.map +1 -0
- package/build/login/types.d.ts +256 -0
- package/build/login/types.d.ts.map +1 -0
- package/build/login/types.js +31 -0
- package/build/login/types.js.map +1 -0
- package/build/manager/components/authentication/control.js +3 -3
- package/build/manager/components/authentication/control.js.map +1 -1
- package/build/manager/components/authentication/types.d.ts +2 -2
- package/build/manager/components/authentication/types.d.ts.map +1 -1
- package/build/manager/components/tunnel-consumer.js +2 -2
- package/build/manager/components/tunnel-consumer.js.map +1 -1
- package/build/manager/entrypoints.d.ts +11 -0
- package/build/manager/entrypoints.d.ts.map +1 -0
- package/build/manager/entrypoints.js +17 -0
- package/build/manager/entrypoints.js.map +1 -0
- package/build/manager/plugins/basic-ed25519.d.ts.map +1 -1
- package/build/manager/plugins/basic-ed25519.js +5 -0
- package/build/manager/plugins/basic-ed25519.js.map +1 -1
- package/build/manager/plugins/exports.d.ts +2 -0
- package/build/manager/plugins/exports.d.ts.map +1 -1
- package/build/manager/plugins/exports.js +2 -0
- package/build/manager/plugins/exports.js.map +1 -1
- package/build/manager/plugins/index.d.ts +1 -5
- package/build/manager/plugins/index.d.ts.map +1 -1
- package/build/manager/plugins/index.js +9 -1
- package/build/manager/plugins/index.js.map +1 -1
- package/build/manager/plugins/methods.d.ts +6 -0
- package/build/manager/plugins/methods.d.ts.map +1 -0
- package/build/manager/plugins/methods.js +65 -0
- package/build/manager/plugins/methods.js.map +1 -0
- package/build/manager/plugins/re-captcha.d.ts.map +1 -1
- package/build/manager/plugins/re-captcha.js +5 -0
- package/build/manager/plugins/re-captcha.js.map +1 -1
- package/build/manager/plugins/registry.d.ts +20 -0
- package/build/manager/plugins/registry.d.ts.map +1 -0
- package/build/manager/plugins/registry.js +19 -0
- package/build/manager/plugins/registry.js.map +1 -0
- package/build/manager/plugins/tunnel-consumer.d.ts.map +1 -1
- package/build/manager/plugins/tunnel-consumer.js +8 -1
- package/build/manager/plugins/tunnel-consumer.js.map +1 -1
- package/build/manager/plugins/types.d.ts +53 -0
- package/build/manager/plugins/types.d.ts.map +1 -1
- package/build/service.js +1 -1
- package/build/service.js.map +1 -1
- package/package.json +36 -27
- package/src/components/dispatcher/component.tsx +16 -3
- package/src/entrypoints.ts +10 -0
- package/src/helper.ts +26 -3
- package/src/index.ts +1 -1
- package/src/login/adopt.ts +31 -0
- package/src/login/consts.ts +64 -0
- package/src/login/credit.ts +75 -0
- package/src/login/env.ts +86 -0
- package/src/login/flow.ts +44 -0
- package/src/login/hook.ts +80 -0
- package/src/login/i18n/be.json +37 -0
- package/src/login/i18n/de.json +37 -0
- package/src/login/i18n/en.json +37 -0
- package/src/login/i18n/es.json +37 -0
- package/src/login/i18n/fr.json +37 -0
- package/src/login/i18n/pl.json +37 -0
- package/src/login/i18n/ru.json +37 -0
- package/src/login/i18n/uk.json +37 -0
- package/src/login/i18n.ts +28 -0
- package/src/login/index.ts +15 -0
- package/src/login/methods.ts +113 -0
- package/src/login/resume.ts +58 -0
- package/src/login/screen.tsx +136 -0
- package/src/login/service.ts +195 -0
- package/src/login/surrogate.ts +45 -0
- package/src/login/terms.ts +0 -0
- package/src/login/types.ts +279 -0
- package/src/manager/README.md +37 -80
- package/src/manager/components/authentication/control.ts +3 -3
- package/src/manager/components/authentication/types.ts +2 -2
- package/src/manager/components/tunnel-consumer.tsx +2 -2
- package/src/manager/entrypoints.ts +18 -0
- package/src/manager/plugins/basic-ed25519.tsx +7 -0
- package/src/manager/plugins/exports.ts +2 -0
- package/src/manager/plugins/index.ts +10 -4
- package/src/manager/plugins/methods.ts +74 -0
- package/src/manager/plugins/re-captcha.tsx +7 -0
- package/src/manager/plugins/registry.ts +26 -0
- package/src/manager/plugins/tunnel-consumer.tsx +10 -1
- package/src/manager/plugins/types.ts +54 -0
- package/src/service.ts +1 -1
- package/tests/context.ts +1 -2
- package/tests/login.spec.ts +332 -0
- package/build/.gitkeep +0 -0
- package/build/manager/modules.d.ts +0 -2
- package/build/manager/modules.d.ts.map +0 -1
- package/build/manager/modules.js +0 -16
- package/build/manager/modules.js.map +0 -1
- package/build/modules.d.ts +0 -4
- package/build/modules.d.ts.map +0 -1
- package/build/modules.js +0 -9
- package/build/modules.js.map +0 -1
- package/src/manager/modules.ts +0 -18
- package/src/modules.ts +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/login/resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,YAAa,YAAY,GAAG,IAAI,KAAG,MAAM,GAAG,IAazE,CAAA;AAED,sEAAsE;AACtE,oBAAY,YAAY;IACtB,kFAAkF;IAClF,IAAI,SAAS;IACb,oFAAoF;IACpF,MAAM,WAAW;IACjB,sEAAsE;IACtE,QAAQ,aAAa;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,YAAa,YAAY,KAAG,YAapD,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { LoginOutcome } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The message key a FINISHED sign-in attempt should show, or null when it actually went somewhere.
|
|
4
|
+
*
|
|
5
|
+
* A dispatcher may treat `Passed` as "carry on with the ordinary continuation", because it has one.
|
|
6
|
+
* A screen does not: the user clicked, the document did not move, and nothing rendered — which is
|
|
7
|
+
* indistinguishable from a broken button, and is exactly how a null authorization URL used to
|
|
8
|
+
* present itself. Every outcome that leaves the user looking at the same screen therefore has to
|
|
9
|
+
* say something.
|
|
10
|
+
*/
|
|
11
|
+
export const loginAttemptError = (outcome) => {
|
|
12
|
+
switch (outcome) {
|
|
13
|
+
case LoginOutcome.Gesture:
|
|
14
|
+
case LoginOutcome.Blocked:
|
|
15
|
+
// The window never opened. That is the popup blocker, and it has its own copy.
|
|
16
|
+
return 'login.error.blocked';
|
|
17
|
+
case LoginOutcome.Failed:
|
|
18
|
+
case LoginOutcome.Passed:
|
|
19
|
+
return 'login.error.failed';
|
|
20
|
+
default:
|
|
21
|
+
// Handled, Redirected and Orphaned all did something; Orphaned reports itself elsewhere.
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/** What a dispatcher does once `login().resume(...)` has answered. */
|
|
26
|
+
export var ResumeAction;
|
|
27
|
+
(function (ResumeAction) {
|
|
28
|
+
/** The plugin took it over — the browser is leaving, or the window is closing. */
|
|
29
|
+
ResumeAction["Stop"] = "stop";
|
|
30
|
+
/** Render the outcome to the user; there is nothing further to do automatically. */
|
|
31
|
+
ResumeAction["Render"] = "render";
|
|
32
|
+
/** Ordinary tab: keep the session and carry on to the application. */
|
|
33
|
+
ResumeAction["Navigate"] = "navigate";
|
|
34
|
+
})(ResumeAction || (ResumeAction = {}));
|
|
35
|
+
/**
|
|
36
|
+
* The one reading of a `resume` outcome, shared by every dispatcher.
|
|
37
|
+
*
|
|
38
|
+
* Exported as a pure function because three dispatchers — `web-client`, `web-oidc-rp` and
|
|
39
|
+
* `mui-oidc-rp` — have to agree on it, and the last time they each held their own copy of a
|
|
40
|
+
* decision they drifted, which is how a popup came to render the application inside itself in two
|
|
41
|
+
* packages at once. It is also the whole rule, so it is testable without a DOM.
|
|
42
|
+
*/
|
|
43
|
+
export const resumeAction = (outcome) => {
|
|
44
|
+
switch (outcome) {
|
|
45
|
+
case LoginOutcome.Handled:
|
|
46
|
+
case LoginOutcome.Redirected:
|
|
47
|
+
return ResumeAction.Stop;
|
|
48
|
+
case LoginOutcome.Orphaned:
|
|
49
|
+
case LoginOutcome.Failed:
|
|
50
|
+
case LoginOutcome.Gesture:
|
|
51
|
+
case LoginOutcome.Blocked:
|
|
52
|
+
return ResumeAction.Render;
|
|
53
|
+
default:
|
|
54
|
+
return ResumeAction.Navigate;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=resume.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../src/login/resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAA4B,EAAiB,EAAE;IAC/E,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,YAAY,CAAC,OAAO,CAAC;QAC1B,KAAK,YAAY,CAAC,OAAO;YACvB,+EAA+E;YAC/E,OAAO,qBAAqB,CAAA;QAC9B,KAAK,YAAY,CAAC,MAAM,CAAC;QACzB,KAAK,YAAY,CAAC,MAAM;YACtB,OAAO,oBAAoB,CAAA;QAC7B;YACE,yFAAyF;YACzF,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC,CAAA;AAED,sEAAsE;AACtE,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,kFAAkF;IAClF,6BAAa,CAAA;IACb,oFAAoF;IACpF,iCAAiB,CAAA;IACjB,sEAAsE;IACtE,qCAAqB,CAAA;AACvB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAqB,EAAgB,EAAE;IAClE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,YAAY,CAAC,OAAO,CAAC;QAC1B,KAAK,YAAY,CAAC,UAAU;YAC1B,OAAO,YAAY,CAAC,IAAI,CAAA;QAC1B,KAAK,YAAY,CAAC,QAAQ,CAAC;QAC3B,KAAK,YAAY,CAAC,MAAM,CAAC;QACzB,KAAK,YAAY,CAAC,OAAO,CAAC;QAC1B,KAAK,YAAY,CAAC,OAAO;YACvB,OAAO,YAAY,CAAC,MAAM,CAAA;QAC5B;YACE,OAAO,YAAY,CAAC,QAAQ,CAAA;IAChC,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { LoginScreenProps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The sign-in screen every application gets, whether or not it registered a styled one.
|
|
5
|
+
*
|
|
6
|
+
* It exists because a relying party must render SOMETHING rather than start a flow on its own, and
|
|
7
|
+
* a relying party may not depend on a UI family. So this is deliberately plain: raw elements and
|
|
8
|
+
* inline styles, no Tailwind class that a consumer's stylesheet would have to scan for, no shadcn
|
|
9
|
+
* primitive a consumer would have to vendor. An application that registers a real screen through
|
|
10
|
+
* `login().registerScreen(...)` never sees it.
|
|
11
|
+
*
|
|
12
|
+
* Because it is the floor rather than the design, it still has to be correct: it offers the same
|
|
13
|
+
* methods, enforces the same terms confirmation, centres the same way, and renders the same
|
|
14
|
+
* credit line.
|
|
15
|
+
*/
|
|
16
|
+
export declare const FallbackLoginScreen: FC<LoginScreenProps>;
|
|
17
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/login/screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAA;AAG9C,OAAO,KAAK,EAA6B,gBAAgB,EAAgB,MAAM,YAAY,CAAA;AA+B3F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,gBAAgB,CAuFpD,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { useContext } from '@owlmeans/client';
|
|
4
|
+
import { LOGIN_SERVICE } from './consts.js';
|
|
5
|
+
import { primaryLoginMethod } from './methods.js';
|
|
6
|
+
import { acceptTerms, resolveTerms, termsAccepted } from './terms.js';
|
|
7
|
+
import { resolveCredit } from './credit.js';
|
|
8
|
+
/**
|
|
9
|
+
* The page the card sits in.
|
|
10
|
+
*
|
|
11
|
+
* It carries its own viewport height because this screen is rendered straight out of the
|
|
12
|
+
* dispatcher, into whatever the application happens to have around it — which is usually nothing
|
|
13
|
+
* with a height, so a percentage minimum would resolve to zero and leave the card at the top.
|
|
14
|
+
*/
|
|
15
|
+
const page = {
|
|
16
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
17
|
+
minHeight: '100dvh', padding: '1rem',
|
|
18
|
+
fontFamily: 'system-ui, sans-serif', lineHeight: 1.5,
|
|
19
|
+
};
|
|
20
|
+
// Centred throughout, so the plain screen and the styled one read the same way.
|
|
21
|
+
const box = {
|
|
22
|
+
width: '100%', maxWidth: '24rem', padding: '1.5rem', textAlign: 'center',
|
|
23
|
+
};
|
|
24
|
+
const button = (emphasis) => ({
|
|
25
|
+
display: 'block', width: '100%', marginTop: '.5rem', padding: '.625rem 1rem',
|
|
26
|
+
fontSize: '1rem', cursor: 'pointer', borderRadius: '.375rem',
|
|
27
|
+
border: '1px solid currentColor',
|
|
28
|
+
...(emphasis === 'primary' ? { fontWeight: 600 } : {}),
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* The sign-in screen every application gets, whether or not it registered a styled one.
|
|
32
|
+
*
|
|
33
|
+
* It exists because a relying party must render SOMETHING rather than start a flow on its own, and
|
|
34
|
+
* a relying party may not depend on a UI family. So this is deliberately plain: raw elements and
|
|
35
|
+
* inline styles, no Tailwind class that a consumer's stylesheet would have to scan for, no shadcn
|
|
36
|
+
* primitive a consumer would have to vendor. An application that registers a real screen through
|
|
37
|
+
* `login().registerScreen(...)` never sees it.
|
|
38
|
+
*
|
|
39
|
+
* Because it is the floor rather than the design, it still has to be correct: it offers the same
|
|
40
|
+
* methods, enforces the same terms confirmation, centres the same way, and renders the same
|
|
41
|
+
* credit line.
|
|
42
|
+
*/
|
|
43
|
+
export const FallbackLoginScreen = props => {
|
|
44
|
+
const context = useContext();
|
|
45
|
+
const t = props.translate ?? ((_key, defaultValue) => defaultValue);
|
|
46
|
+
const cfg = props.config ?? context.cfg.security?.auth?.login;
|
|
47
|
+
const brand = context.cfg.brand;
|
|
48
|
+
const login = context.service(LOGIN_SERVICE);
|
|
49
|
+
const env = login.env();
|
|
50
|
+
const resolved = resolveTerms(props.terms ?? cfg?.terms);
|
|
51
|
+
const credit = resolveCredit(cfg?.credit, brand, context.cfg.service);
|
|
52
|
+
const [accepted, setAccepted] = useState(() => termsAccepted(resolved));
|
|
53
|
+
const [attempted, setAttempted] = useState(false);
|
|
54
|
+
const all = login.methods({ context, env });
|
|
55
|
+
const methods = typeof props.methods === 'function'
|
|
56
|
+
? props.methods(all)
|
|
57
|
+
: props.methods ?? all;
|
|
58
|
+
const primary = primaryLoginMethod(methods);
|
|
59
|
+
const blocked = resolved != null && resolved.required && !accepted;
|
|
60
|
+
const select = useCallback((method) => {
|
|
61
|
+
if (blocked) {
|
|
62
|
+
setAttempted(true);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
void method.start({ context, env });
|
|
66
|
+
}, [blocked, context, env]);
|
|
67
|
+
const onAccept = useCallback((value) => {
|
|
68
|
+
setAccepted(value);
|
|
69
|
+
setAttempted(false);
|
|
70
|
+
acceptTerms(resolved, value);
|
|
71
|
+
}, [resolved]);
|
|
72
|
+
return _jsx("div", { "data-login-screen": true, style: page, children: _jsxs("div", { style: box, children: [_jsx("h1", { style: { fontSize: '1.25rem', marginBottom: '.25rem' }, children: props.title ?? t('login.title', 'Sign in') }), _jsx("p", { style: { opacity: .75, marginTop: 0 }, children: props.subtitle ?? t('login.subtitle', 'Choose how you would like to continue.') }), methods.length < 1
|
|
73
|
+
? _jsx("p", { role: "status", children: t('login.empty', 'No sign-in method is configured for this application.') })
|
|
74
|
+
: methods.map(method => _jsx("button", { type: "button", "data-login-method": method.id, "aria-disabled": blocked, "data-blocked": blocked ? 'true' : undefined, style: { ...button(method.emphasis), opacity: blocked ? .6 : 1 }, autoFocus: method.id === primary?.id, onClick: () => select(method), children: method.label ?? t(`login.method.${method.i18nKey ?? method.id}`, method.id) }, method.id)), resolved != null && _jsxs("p", { style: { marginTop: '1rem', fontSize: '.875rem' }, children: [_jsxs("label", { children: [_jsx("input", { type: "checkbox", checked: accepted, "data-login-terms": true, onChange: event => onAccept(event.target.checked) }), ' ', t('login.terms.agreement', 'I have read and agree to the Terms & Conditions and the Privacy Policy.')] }), ' ', _jsx("a", { href: resolved.terms, target: "_blank", rel: "noreferrer noopener", children: t('login.terms.terms', 'Terms & Conditions') }), ' · ', _jsx("a", { href: resolved.privacy, target: "_blank", rel: "noreferrer noopener", children: t('login.terms.privacy', 'Privacy Policy') })] }), attempted && blocked && _jsx("p", { role: "alert", style: { color: '#b00', fontSize: '.875rem' }, children: t('login.terms.required', 'Please confirm the Terms & Conditions and the Privacy Policy to continue.') }), props.footer ?? _jsxs("p", { style: { marginTop: '2rem', fontSize: '.75rem', opacity: .7 }, children: [credit.poweredBy && _jsx("span", { children: t('login.credit.powered', 'Powered by OwlMeans') }), credit.poweredBy && credit.line != null && ' · ', credit.line] })] }) });
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../../src/login/screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C;;;;;;GAMG;AACH,MAAM,IAAI,GAAkB;IAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ;IAC/D,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IACpC,UAAU,EAAE,uBAAuB,EAAE,UAAU,EAAE,GAAG;CACrD,CAAA;AAED,gFAAgF;AAChF,MAAM,GAAG,GAAkB;IACzB,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ;CACzE,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,QAAiB,EAAiB,EAAE,CAAC,CAAC;IACpD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc;IAC5E,QAAQ,EAAE,MAAM,E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,EAAE,oBAAoB,CAAC,GAC3C,EACH,KAAK,EACN,YAAG,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,YACjE,CAAC,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,GACzC,IACF,EAEH,SAAS,IAAI,OAAO,IAAI,YAAG,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,YACnF,CAAC,CAAC,sBAAsB,EACvB,2EAA2E,CAAC,GAC5E,EAEH,KAAK,CAAC,MAAM,IAAI,aAAG,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,aAC9E,MAAM,CAAC,SAAS,IAAI,yBAAO,CAAC,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,GAAQ,EACnF,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,EAChD,MAAM,CAAC,IAAI,IACV,IACA,GAAM,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BasicConfig, BasicContext } from '@owlmeans/context';
|
|
2
|
+
import { LoginOutcome } from './types.js';
|
|
3
|
+
import type { LoginService, LoginServiceAppend } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Login service = plugin host. It holds a registry of login plugins and, on every facade call,
|
|
6
|
+
* resolves the active plugin by cascade (priority desc, first whose `match(env)` is truthy) and
|
|
7
|
+
* delegates to it.
|
|
8
|
+
*
|
|
9
|
+
* The facade methods stay ordinary writable properties (never getters) so that non-plugin
|
|
10
|
+
* implementations — e.g. a native login service — can keep overriding them directly.
|
|
11
|
+
*
|
|
12
|
+
* It is a LAZY service on purpose. The host carries no async setup, and plugin packages must be
|
|
13
|
+
* able to reach it from an app's `makeContext` — i.e. while the context is still in the Loading
|
|
14
|
+
* stage. `context.service()` throws for an uninitialized non-lazy service, which would make
|
|
15
|
+
* `ensureLoginService` fail exactly where apps are told to call it.
|
|
16
|
+
*
|
|
17
|
+
* `begin` and `logout` are deliberately NOT `async`. An async facade method defers the plugin's
|
|
18
|
+
* body past a microtask boundary, and a `window.open` that lands after the user gesture has
|
|
19
|
+
* finished being handled is eaten by the popup blocker. The same rule binds every plugin's own
|
|
20
|
+
* `begin` and `logout`, and it is why a precondition must be synchronous too.
|
|
21
|
+
*/
|
|
22
|
+
export declare const makeLoginService: (alias?: string) => LoginService;
|
|
23
|
+
/**
|
|
24
|
+
* Idempotently obtain the login service on a context, registering an empty host if none exists
|
|
25
|
+
* yet. Plugin packages call this before `registerPlugin`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ensureLoginService: (ctx: BasicContext<any>) => LoginService;
|
|
28
|
+
/** Register the host and expose it as `context.login()`. */
|
|
29
|
+
export declare const appendLogin: <C extends BasicConfig, T extends BasicContext<C>>(ctx: T) => T & LoginServiceAppend;
|
|
30
|
+
export { LoginOutcome };
|
|
31
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/login/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAMlE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAEY,YAAY,EAAE,kBAAkB,EACvD,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,WAAW,MAAM,KAAmB,YAwIhE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAS,YAAY,CAAC,GAAG,CAAC,KAAG,YAQ3D,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,OACrE,CAAC,KACL,CAAC,GAAG,kBAMN,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { createLazyService } from '@owlmeans/context';
|
|
2
|
+
import { DEFAULT_ALIAS } from './consts.js';
|
|
3
|
+
import { defaultLoginEnv } from './env.js';
|
|
4
|
+
import { adoptToken, revokeToken } from './adopt.js';
|
|
5
|
+
import { resolveLoginMethods } from './methods.js';
|
|
6
|
+
import { LoginOutcome } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Login service = plugin host. It holds a registry of login plugins and, on every facade call,
|
|
9
|
+
* resolves the active plugin by cascade (priority desc, first whose `match(env)` is truthy) and
|
|
10
|
+
* delegates to it.
|
|
11
|
+
*
|
|
12
|
+
* The facade methods stay ordinary writable properties (never getters) so that non-plugin
|
|
13
|
+
* implementations — e.g. a native login service — can keep overriding them directly.
|
|
14
|
+
*
|
|
15
|
+
* It is a LAZY service on purpose. The host carries no async setup, and plugin packages must be
|
|
16
|
+
* able to reach it from an app's `makeContext` — i.e. while the context is still in the Loading
|
|
17
|
+
* stage. `context.service()` throws for an uninitialized non-lazy service, which would make
|
|
18
|
+
* `ensureLoginService` fail exactly where apps are told to call it.
|
|
19
|
+
*
|
|
20
|
+
* `begin` and `logout` are deliberately NOT `async`. An async facade method defers the plugin's
|
|
21
|
+
* body past a microtask boundary, and a `window.open` that lands after the user gesture has
|
|
22
|
+
* finished being handled is eaten by the popup blocker. The same rule binds every plugin's own
|
|
23
|
+
* `begin` and `logout`, and it is why a precondition must be synchronous too.
|
|
24
|
+
*/
|
|
25
|
+
export const makeLoginService = (alias = DEFAULT_ALIAS) => {
|
|
26
|
+
const plugins = [];
|
|
27
|
+
const preconditions = [];
|
|
28
|
+
const methodSources = [];
|
|
29
|
+
let screen = null;
|
|
30
|
+
let notifier = null;
|
|
31
|
+
const ctx = () => service.ctx;
|
|
32
|
+
const service = createLazyService(alias, {
|
|
33
|
+
registerPlugin: (plugin) => {
|
|
34
|
+
const existing = plugins.findIndex(candidate => candidate.alias === plugin.alias);
|
|
35
|
+
if (existing >= 0) {
|
|
36
|
+
plugins.splice(existing, 1);
|
|
37
|
+
}
|
|
38
|
+
plugins.push(plugin);
|
|
39
|
+
plugins.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
40
|
+
},
|
|
41
|
+
registerPrecondition: (precondition) => {
|
|
42
|
+
const existing = preconditions.findIndex(candidate => candidate.alias === precondition.alias);
|
|
43
|
+
if (existing >= 0) {
|
|
44
|
+
preconditions.splice(existing, 1);
|
|
45
|
+
}
|
|
46
|
+
preconditions.push(precondition);
|
|
47
|
+
preconditions.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
48
|
+
},
|
|
49
|
+
registerMethodSource: (source) => {
|
|
50
|
+
const existing = methodSources.findIndex(candidate => candidate.alias === source.alias);
|
|
51
|
+
if (existing >= 0) {
|
|
52
|
+
methodSources.splice(existing, 1);
|
|
53
|
+
}
|
|
54
|
+
methodSources.push(source);
|
|
55
|
+
},
|
|
56
|
+
methods: methodCtx => resolveLoginMethods(methodCtx, methodCtx.context.cfg.security?.auth?.login, methodSources),
|
|
57
|
+
registerScreen: value => { screen = value; },
|
|
58
|
+
screen: () => screen,
|
|
59
|
+
registerNotifier: value => { notifier = value; },
|
|
60
|
+
plugin: env => {
|
|
61
|
+
const environment = env ?? defaultLoginEnv();
|
|
62
|
+
const plugin = plugins.find(candidate => candidate.match?.(environment, service.ctx) ?? true);
|
|
63
|
+
if (plugin == null) {
|
|
64
|
+
throw new Error('login: no plugin matches the current environment');
|
|
65
|
+
}
|
|
66
|
+
return plugin;
|
|
67
|
+
},
|
|
68
|
+
env: () => defaultLoginEnv(),
|
|
69
|
+
enter: () => {
|
|
70
|
+
const env = defaultLoginEnv();
|
|
71
|
+
service.plugin(env).enter?.(ctx(), env);
|
|
72
|
+
},
|
|
73
|
+
begin: request => {
|
|
74
|
+
const env = defaultLoginEnv();
|
|
75
|
+
// Synchronously, before anything can open a window: a precondition that refuses leaves the
|
|
76
|
+
// user exactly where `Gesture` describes — unable to proceed until they act again.
|
|
77
|
+
for (const precondition of preconditions) {
|
|
78
|
+
if (!precondition.check(ctx(), request, env)) {
|
|
79
|
+
return Promise.resolve(LoginOutcome.Gesture);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Notified here, in the facade, rather than by each caller: `useLogin` fires the flow and
|
|
83
|
+
// forgets the result, and this is the one place every caller — the header hook and the
|
|
84
|
+
// sign-in screen's method buttons alike — passes through on the way to a settled outcome.
|
|
85
|
+
return service.plugin(env).begin(ctx(), request, env).then(outcome => {
|
|
86
|
+
notifier?.(outcome, env);
|
|
87
|
+
return outcome;
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
authorize: async (url) => {
|
|
91
|
+
const env = defaultLoginEnv();
|
|
92
|
+
return await service.plugin(env).authorize(ctx(), url, env);
|
|
93
|
+
},
|
|
94
|
+
complete: async (token) => {
|
|
95
|
+
const env = defaultLoginEnv();
|
|
96
|
+
return await service.plugin(env).complete(ctx(), token, env);
|
|
97
|
+
},
|
|
98
|
+
resume: async (token) => {
|
|
99
|
+
const env = defaultLoginEnv();
|
|
100
|
+
// Absent means "keep it and carry on" — which is what an ordinary tab has always done, and
|
|
101
|
+
// is why the redirect plugin implements nothing here.
|
|
102
|
+
return await service.plugin(env).resume?.(ctx(), token, env) ?? LoginOutcome.Passed;
|
|
103
|
+
},
|
|
104
|
+
logout: request => {
|
|
105
|
+
const env = defaultLoginEnv();
|
|
106
|
+
const plugin = service.plugin(env);
|
|
107
|
+
if (plugin.logout == null) {
|
|
108
|
+
// A plugin with no logout mechanic still has to end the session it started.
|
|
109
|
+
return revokeToken(ctx()).then(async () => {
|
|
110
|
+
await request.navigate?.();
|
|
111
|
+
return LoginOutcome.Passed;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return plugin.logout(ctx(), request, env).then(outcome => {
|
|
115
|
+
notifier?.(outcome, env);
|
|
116
|
+
return outcome;
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
logoutComplete: async () => {
|
|
120
|
+
const env = defaultLoginEnv();
|
|
121
|
+
return await service.plugin(env).logoutComplete?.(ctx(), env) ?? LoginOutcome.Passed;
|
|
122
|
+
},
|
|
123
|
+
adopt: async (token) => { await adoptToken(ctx(), token); },
|
|
124
|
+
revoke: async () => { await revokeToken(ctx()); },
|
|
125
|
+
});
|
|
126
|
+
return service;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Idempotently obtain the login service on a context, registering an empty host if none exists
|
|
130
|
+
* yet. Plugin packages call this before `registerPlugin`.
|
|
131
|
+
*/
|
|
132
|
+
export const ensureLoginService = (ctx) => {
|
|
133
|
+
if (ctx.hasService(DEFAULT_ALIAS)) {
|
|
134
|
+
return ctx.service(DEFAULT_ALIAS);
|
|
135
|
+
}
|
|
136
|
+
const service = makeLoginService();
|
|
137
|
+
ctx.registerService(service);
|
|
138
|
+
return service;
|
|
139
|
+
};
|
|
140
|
+
/** Register the host and expose it as `context.login()`. */
|
|
141
|
+
export const appendLogin = (ctx) => {
|
|
142
|
+
ensureLoginService(ctx);
|
|
143
|
+
const contextual = ctx;
|
|
144
|
+
contextual.login = () => ctx.service(DEFAULT_ALIAS);
|
|
145
|
+
return contextual;
|
|
146
|
+
};
|
|
147
|
+
export { LoginOutcome };
|
|
148
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/login/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,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|
|
|
1
|
+
import { LoginIntent } from './types.js';
|
|
2
|
+
import type { LoginContext } from './types.js';
|
|
3
|
+
export interface SurrogateTarget {
|
|
4
|
+
intent: LoginIntent;
|
|
5
|
+
/** The address the surrogate should actually run, once it is one window up. */
|
|
6
|
+
next?: string;
|
|
7
|
+
/** The method the user already chose in the opener. */
|
|
8
|
+
method?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Where a surrogate window opens.
|
|
12
|
+
*
|
|
13
|
+
* Returns `null` when the application's entrypoint list predates the surrogate route — an app
|
|
14
|
+
* built against an older `@owlmeans/auth-common` has no such entrypoint, and the caller then falls
|
|
15
|
+
* back to opening the dispatcher directly, which is exactly what it used to do. That fallback is
|
|
16
|
+
* the whole compatibility story for already-deployed applications, so it must never be removed in
|
|
17
|
+
* favour of throwing.
|
|
18
|
+
*/
|
|
19
|
+
export declare const surrogatePath: (ctx: LoginContext, target: SurrogateTarget) => string | null;
|
|
20
|
+
//# sourceMappingURL=surrogate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surrogate.d.ts","sourceRoot":"","sources":["../../src/login/surrogate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,QAAS,YAAY,UAAU,eAAe,KAAG,MAAM,GAAG,IAqBnF,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DISPATCHER_SURROGATE } from '@owlmeans/auth';
|
|
2
|
+
import { LOGIN_INTENT_QUERY, LOGIN_METHOD_QUERY, LOGIN_NEXT_QUERY } from './consts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where a surrogate window opens.
|
|
5
|
+
*
|
|
6
|
+
* Returns `null` when the application's entrypoint list predates the surrogate route — an app
|
|
7
|
+
* built against an older `@owlmeans/auth-common` has no such entrypoint, and the caller then falls
|
|
8
|
+
* back to opening the dispatcher directly, which is exactly what it used to do. That fallback is
|
|
9
|
+
* the whole compatibility story for already-deployed applications, so it must never be removed in
|
|
10
|
+
* favour of throwing.
|
|
11
|
+
*/
|
|
12
|
+
export const surrogatePath = (ctx, target) => {
|
|
13
|
+
if (!ctx.hasEntrypoint(DISPATCHER_SURROGATE)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
let path;
|
|
17
|
+
try {
|
|
18
|
+
path = ctx.entrypoint(DISPATCHER_SURROGATE).path();
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const query = new URLSearchParams();
|
|
24
|
+
query.set(LOGIN_INTENT_QUERY, target.intent);
|
|
25
|
+
if (target.next != null && target.next !== '') {
|
|
26
|
+
query.set(LOGIN_NEXT_QUERY, target.next);
|
|
27
|
+
}
|
|
28
|
+
if (target.method != null && target.method !== '') {
|
|
29
|
+
query.set(LOGIN_METHOD_QUERY, target.method);
|
|
30
|
+
}
|
|
31
|
+
return `${path}?${query.toString()}`;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=surrogate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surrogate.js","sourceRoot":"","sources":["../../src/login/surrogate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAYtF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAiB,EAAE,MAAuB,EAAiB,EAAE;IACzF,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,IAAY,CAAA;IAChB,IAAI,CAAC;QACH,IAAI,GAAG,GAAG,CAAC,UAAU,CAAmB,oBAAoB,CAAC,CAAC,IAAI,EAAE,CAAA;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAA;IACnC,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAC5C,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1C,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QAClD,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,GAAG,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAA;AACtC,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LoginTermsConfig } from '@owlmeans/config';
|
|
2
|
+
export interface ResolvedTerms {
|
|
3
|
+
required: boolean;
|
|
4
|
+
terms: string;
|
|
5
|
+
privacy: string;
|
|
6
|
+
cookies?: string;
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const resolveTerms: (cfg?: LoginTermsConfig | false) => ResolvedTerms | null;
|
|
10
|
+
/**
|
|
11
|
+
* Whether this browser has already agreed to exactly these documents.
|
|
12
|
+
*
|
|
13
|
+
* `localStorage` and not a cookie: the record is a UI convenience, it never travels to a server,
|
|
14
|
+
* and it must be readable by the surrogate login window — which is same-origin, so it sees the
|
|
15
|
+
* opener's acceptance and does not ask twice. A preview iframe on a different origin gets its own
|
|
16
|
+
* partition and therefore its own acceptance, which is correct rather than unfortunate.
|
|
17
|
+
*/
|
|
18
|
+
export declare const termsAccepted: (resolved: ResolvedTerms | null) => boolean;
|
|
19
|
+
export declare const acceptTerms: (resolved: ResolvedTerms | null, accepted: boolean) => void;
|
|
20
|
+
//# sourceMappingURL=terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/login/terms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAGxD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAkBD,eAAO,MAAM,YAAY,SAAU,gBAAgB,GAAG,KAAK,KAAG,aAAa,GAAG,IAa7E,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,aAAc,aAAa,GAAG,IAAI,KAAG,OAW9D,CAAA;AAED,eAAO,MAAM,WAAW,aAAc,aAAa,GAAG,IAAI,YAAY,OAAO,KAAG,IAW/E,CAAA"}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.js","sourceRoot":"","sources":["../../src/login/terms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAEjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAUjD;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,CAAC,KAAe,EA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