@consciousclouds/account-security-experience 0.0.0-stage → 0.1.1
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/LICENSE +171 -0
- package/README.md +54 -2
- package/dist/contracts.d.ts +190 -0
- package/dist/contracts.js +2 -0
- package/dist/contracts.js.map +1 -0
- package/dist/email.d.ts +3 -0
- package/dist/email.js +5 -0
- package/dist/email.js.map +1 -0
- package/dist/experience.d.ts +4 -0
- package/dist/experience.js +153 -0
- package/dist/experience.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +2 -0
- package/dist/messages.js +8 -0
- package/dist/messages.js.map +1 -0
- package/dist/mfa.d.ts +3 -0
- package/dist/mfa.js +5 -0
- package/dist/mfa.js.map +1 -0
- package/dist/overview.d.ts +3 -0
- package/dist/overview.js +5 -0
- package/dist/overview.js.map +1 -0
- package/dist/passkeys.d.ts +3 -0
- package/dist/passkeys.js +5 -0
- package/dist/passkeys.js.map +1 -0
- package/dist/password.d.ts +3 -0
- package/dist/password.js +5 -0
- package/dist/password.js.map +1 -0
- package/dist/recovery.d.ts +3 -0
- package/dist/recovery.js +5 -0
- package/dist/recovery.js.map +1 -0
- package/dist/sessions.d.ts +3 -0
- package/dist/sessions.js +5 -0
- package/dist/sessions.js.map +1 -0
- package/package.json +73 -4
- package/styles/security.css +6 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and included
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
+
Contribution embodied within the Work constitutes direct or contributory
|
|
82
|
+
patent infringement, then any patent licenses granted to You under
|
|
83
|
+
this License for that Work shall terminate as of the date such
|
|
84
|
+
litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
+
modifications, and in Source or Object form, provided that You
|
|
89
|
+
meet the following conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative Works
|
|
92
|
+
a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works that
|
|
98
|
+
You distribute, all copyright, patent, trademark, and attribution
|
|
99
|
+
notices from the Source form of the Work, excluding those notices
|
|
100
|
+
that do not pertain to any part of the Derivative Works; and
|
|
101
|
+
|
|
102
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
103
|
+
distribution, You must include a readable copy of the attribution
|
|
104
|
+
notices contained within such NOTICE file, in at least one of the
|
|
105
|
+
following places: within a NOTICE text provided as part of the
|
|
106
|
+
Derivative Works; within the Source form or documentation, if
|
|
107
|
+
provided along with the Derivative Works; or, within a display
|
|
108
|
+
generated by the Derivative Works, if and wherever such third-party
|
|
109
|
+
notices normally appear. The contents of the NOTICE file are for
|
|
110
|
+
informational purposes only and do not modify the License. You may
|
|
111
|
+
add Your own attribution notices within Derivative Works that You
|
|
112
|
+
distribute, alongside or in addition to the NOTICE text from the
|
|
113
|
+
Work, provided that such additional attribution notices cannot be
|
|
114
|
+
construed as modifying the License.
|
|
115
|
+
|
|
116
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
117
|
+
any Contribution intentionally submitted for inclusion in the Work by
|
|
118
|
+
You to the Licensor shall be under the terms and conditions of this
|
|
119
|
+
License, without any additional terms or conditions.
|
|
120
|
+
|
|
121
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
122
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
123
|
+
except as required for reasonable and customary use in describing the
|
|
124
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
125
|
+
|
|
126
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
127
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
128
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
129
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
130
|
+
implied, including, without limitation, any conditions of TITLE,
|
|
131
|
+
MERCHANTIBILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
|
132
|
+
responsible for determining the appropriateness of using or
|
|
133
|
+
redistributing the Work and assume any risks associated with Your
|
|
134
|
+
exercise of permissions under this License.
|
|
135
|
+
|
|
136
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
137
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
138
|
+
unless required by applicable law (such as deliberate and grossly
|
|
139
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
140
|
+
liable to You for damages, including any direct, indirect, special,
|
|
141
|
+
incidental, or exemplary damages of any character arising as a result
|
|
142
|
+
of this License or out of the use or inability to use the Work
|
|
143
|
+
(including but not limited to damages for loss of goodwill, work
|
|
144
|
+
stoppage, computer failure or malfunction, or all other commercial
|
|
145
|
+
damages or losses), even if such Contributor has been advised of the
|
|
146
|
+
possibility of such damages.
|
|
147
|
+
|
|
148
|
+
9. Accepting Warranty or Liability. While redistributing the Work or
|
|
149
|
+
Derivative Works thereof, You may choose to offer, and charge a fee
|
|
150
|
+
for, acceptance of support, warranty, indemnity, or other liability
|
|
151
|
+
obligations and/or rights consistent with this License. However, in
|
|
152
|
+
accepting such obligations, You may offer such obligations only on
|
|
153
|
+
Your own behalf and on Your sole responsibility, not on behalf of any
|
|
154
|
+
other Contributor, and only if You agree to indemnify, defend, and
|
|
155
|
+
hold each Contributor harmless for any liability incurred by, or
|
|
156
|
+
claims asserted against, such Contributor by reason of your accepting
|
|
157
|
+
any such warranty or additional liability.
|
|
158
|
+
|
|
159
|
+
Copyright 2024 Conscious Clouds
|
|
160
|
+
|
|
161
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
162
|
+
you may not use this file except in compliance with the License.
|
|
163
|
+
You may obtain a copy of the License at
|
|
164
|
+
|
|
165
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
166
|
+
|
|
167
|
+
Unless required by applicable law or agreed to in writing, software
|
|
168
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
169
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
170
|
+
See the License for the specific language governing permissions and
|
|
171
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Account Security & Recovery Experience 0.1.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local release candidate. Optional React 19 presentation; no backend integration or publication is claimed.
|
|
4
|
+
|
|
5
|
+
Install through the approved package release chain. Runtime dependency: `@consciousclouds/ui ^0.1.4` (including its governed Tokens closure). Peers: React/React DOM ^19.0.0. The package does not import Auth, Account, OperatorShell, SDK transports, product applications or identity runtimes. Compose alongside the existing Auth/Account/Appearance Experiences. Frozen packages remain unchanged.
|
|
6
|
+
|
|
7
|
+
## Public modules
|
|
8
|
+
|
|
9
|
+
| Public subpath | Component | Presentation |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `/password` | PasswordExperience | Change, forgot, reset; requirements, confirmation and visibility |
|
|
12
|
+
| `/email` | EmailVerificationExperience | Pending/verified/expired, resend, verify, change and confirm address |
|
|
13
|
+
| `/mfa` | MfaExperience | Authenticator setup key, verification, short-lived recovery codes, removal |
|
|
14
|
+
| `/passkeys` | PasskeysExperience | Register/authenticate, list, rename and remove |
|
|
15
|
+
| `/sessions` | SessionsExperience | Current/other sessions, individual/other/all revocation |
|
|
16
|
+
| `/recovery` | RecoveryExperience | Enumeration-safe request, status, lost-device explanation and optional support navigation |
|
|
17
|
+
| `/overview` | SecurityOverviewExperience | Provider-supplied activity, recovery methods and notification summaries |
|
|
18
|
+
|
|
19
|
+
All components, types and `englishSecurityMessages` are also exported at the root. CSS: `@consciousclouds/account-security-experience/styles.css`. These are optional entrypoints in one versioned artifact, not separately versioned runtimes. Import only the needed components; unsupported actions are absent. No automatic discovery, routes, providers or generic configuration engine.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { SessionsExperience } from '@consciousclouds/account-security-experience/sessions';
|
|
23
|
+
import { englishSecurityMessages } from '@consciousclouds/account-security-experience';
|
|
24
|
+
// Import foundation styles once in the host global CSS, followed by this package's styles.
|
|
25
|
+
// The host loads a verified projection and creates product-owned SDK adapters.
|
|
26
|
+
<SessionsExperience context={context} snapshot={snapshot}
|
|
27
|
+
capabilities={authorizedPresentationActions} actions={productActions}
|
|
28
|
+
messages={englishSecurityMessages} onConfirmed={refreshVerifiedProjection} />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Contract and lifecycle
|
|
32
|
+
|
|
33
|
+
`SecurityExperienceProps`, `SecurityInputs`, `SecurityActions`, `ResultFor`, `ActionRequest` and `SecuritySnapshot` are the public contracts in `src/contracts.ts`. Every action has a distinct input/result type. No URLs, bearer tokens, credential storage, network client or authorization implementation is supplied.
|
|
34
|
+
|
|
35
|
+
The host supplies `{accountKey, projectKey, issuer, revision}`. Keys must be nonsecret. Increment revision when session liveness, identity, challenge, authority or snapshot revision changes. Keyed remounts synchronously discard forms and results on context, admission, capability, support, challenge or module changes. Abort signals plus request sequence checks also discard responses from adapters ignoring abort. A result must echo the complete originating context; mismatches are rejected. A snapshot must match context before private data renders. Never derive this admission from an unverified decoded JWT.
|
|
36
|
+
|
|
37
|
+
Adapters must authorize every operation on the server, enforce CSRF/origin protections, throttling, password policy, challenge binding, single use, reauthentication, idempotency where applicable and audit. `capabilities` only controls presentation. No frontend state grants access. Supply an action and a capability to expose a control. MFA additionally requires `support.mfa`; passkeys require `support.webAuthn` after real backend and platform support detection.
|
|
38
|
+
|
|
39
|
+
For challenge operations the host supplies a nonsecret id, valid/invalid/expired status and expiry in epoch milliseconds. Secret challenge material stays in the adapter/BFF. The UI checks expiry before submission and after response, and stops pending presentation when expiration is observed. Local clocks are UX guards; the server remains authoritative. Reauthentication-required results offer an optional host callback; no automatic action retry or remembered password follows reauthentication.
|
|
40
|
+
|
|
41
|
+
Forgot-password and recovery-request results allow only an enumeration-safe accepted response or generic infrastructure/policy states. The host must normalize account-dependent error, timing and delivery behavior; the component cannot guarantee server enumeration safety. Never interpret accepted as email delivery or confirmed recovery. Password policy copy and optional validation come from the product; client validation cannot replace enforcement.
|
|
42
|
+
|
|
43
|
+
Passkey adapters execute the genuine platform ceremony and server verification. The component never calls WebAuthn or handles private keys. MFA setup and recovery-code values live only in transient React state, require a finite expiry and disappear on dismissal, expiry, context change or unmount. No QR generator, clipboard, download, logging or storage is provided. JavaScript cannot guarantee memory zeroization or prevent extensions/screenshots from observing deliberately displayed secrets; hosts must omit session replay/analytics around these surfaces.
|
|
44
|
+
|
|
45
|
+
Revocation results remain confirmed, failed or unknown. Exceptions become unknown because a server mutation may have succeeded before transport failure. `onConfirmed` refreshes the authoritative projection; if refresh fails, the outcome shown becomes unknown. Never infer global revocation from a password-change success or from an HTTP response that swallowed upstream failure. Only a verified host projection can change session admission. Browser back/route state and host callback behavior remain host responsibilities.
|
|
46
|
+
|
|
47
|
+
## Brand, layout and accessibility
|
|
48
|
+
|
|
49
|
+
Inherit the approved Tokens/Brand semantic HSL theme from the nearest scope. No logos/fonts/navigation are imposed. Layouts: panel, embedded, standalone. Scoped CSS uses wrapping, container queries, minimum 44px controls and reduced-motion overrides. No global resets or root token writes. Every visible string can be localized with `SecurityMessages`; locale/direction are host inputs, as are product header content and password-policy text.
|
|
50
|
+
|
|
51
|
+
Named controls, status announcements, first action heading focus, explicit destructive confirmation and return focus on Cancel are provided. Failed forms keep safe status copy, clear submitted sensitive fields, and allow a new deliberate attempt. Tests cover keyboard focus and browser semantics, not a WCAG certification. Real screen reader, password manager, platform passkey and assistive technology review remains an integration gate.
|
|
52
|
+
|
|
53
|
+
## Restrictions
|
|
54
|
+
|
|
55
|
+
No signup, consumer identity federation, operator admission, backend recovery, delivery, MFA verification, WebAuthn cryptography, session inventory source, notification persistence or security event ingestion. Public CCU operator registration remains prohibited. Missing backend capabilities must stay hidden/unavailable. All fixture identities, codes and outcomes are synthetic and prominently labeled.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Host must change revision on session, capability, challenge or account changes. Never put secrets here. */
|
|
3
|
+
export interface SecurityContext {
|
|
4
|
+
accountKey: string;
|
|
5
|
+
projectKey: string;
|
|
6
|
+
issuer: string;
|
|
7
|
+
revision: string;
|
|
8
|
+
}
|
|
9
|
+
export type SecurityModule = 'password' | 'email' | 'mfa' | 'passkeys' | 'sessions' | 'recovery' | 'overview';
|
|
10
|
+
export interface SecurityInputs {
|
|
11
|
+
changePassword: {
|
|
12
|
+
currentPassword: string;
|
|
13
|
+
newPassword: string;
|
|
14
|
+
};
|
|
15
|
+
forgotPassword: {
|
|
16
|
+
email: string;
|
|
17
|
+
};
|
|
18
|
+
resetPassword: {
|
|
19
|
+
newPassword: string;
|
|
20
|
+
};
|
|
21
|
+
resendVerification: Record<string, never>;
|
|
22
|
+
verifyEmail: Record<string, never>;
|
|
23
|
+
changeEmail: {
|
|
24
|
+
email: string;
|
|
25
|
+
};
|
|
26
|
+
confirmEmailChange: Record<string, never>;
|
|
27
|
+
enrollMfa: Record<string, never>;
|
|
28
|
+
verifyMfa: {
|
|
29
|
+
code: string;
|
|
30
|
+
};
|
|
31
|
+
recoveryCodes: Record<string, never>;
|
|
32
|
+
removeMfa: Record<string, never>;
|
|
33
|
+
registerPasskey: {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
authenticatePasskey: Record<string, never>;
|
|
37
|
+
renamePasskey: {
|
|
38
|
+
credentialId: string;
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
removePasskey: {
|
|
42
|
+
credentialId: string;
|
|
43
|
+
};
|
|
44
|
+
revokeSession: {
|
|
45
|
+
sessionId: string;
|
|
46
|
+
};
|
|
47
|
+
revokeOthers: Record<string, never>;
|
|
48
|
+
revokeEverywhere: Record<string, never>;
|
|
49
|
+
requestRecovery: {
|
|
50
|
+
email: string;
|
|
51
|
+
};
|
|
52
|
+
checkRecovery: Record<string, never>;
|
|
53
|
+
}
|
|
54
|
+
export type SecurityOperation = keyof SecurityInputs;
|
|
55
|
+
export type Failure = 'failed' | 'unknown' | 'denied' | 'unavailable' | 'expired' | 'invalid' | 'conflict' | 'reauthentication-required';
|
|
56
|
+
/** Values are safe presentation enums; never display raw server exception messages. */
|
|
57
|
+
export type SecurityOutcome = {
|
|
58
|
+
status: Failure;
|
|
59
|
+
} | {
|
|
60
|
+
status: 'confirmed';
|
|
61
|
+
} | {
|
|
62
|
+
status: 'pending';
|
|
63
|
+
} | {
|
|
64
|
+
status: 'accepted';
|
|
65
|
+
} | {
|
|
66
|
+
status: 'enrollment';
|
|
67
|
+
secret: string;
|
|
68
|
+
expiresAt: number;
|
|
69
|
+
} | {
|
|
70
|
+
status: 'recovery-codes';
|
|
71
|
+
codes: readonly string[];
|
|
72
|
+
expiresAt: number;
|
|
73
|
+
};
|
|
74
|
+
export type ResultFor<K extends SecurityOperation> = K extends 'forgotPassword' | 'requestRecovery' ? {
|
|
75
|
+
status: 'accepted';
|
|
76
|
+
} | {
|
|
77
|
+
status: Exclude<Failure, 'invalid'>;
|
|
78
|
+
} : K extends 'enrollMfa' ? {
|
|
79
|
+
status: Failure;
|
|
80
|
+
} | {
|
|
81
|
+
status: 'enrollment';
|
|
82
|
+
secret: string;
|
|
83
|
+
expiresAt: number;
|
|
84
|
+
} : K extends 'recoveryCodes' ? {
|
|
85
|
+
status: Failure;
|
|
86
|
+
} | {
|
|
87
|
+
status: 'recovery-codes';
|
|
88
|
+
codes: readonly string[];
|
|
89
|
+
expiresAt: number;
|
|
90
|
+
} : {
|
|
91
|
+
status: Failure | 'confirmed' | 'pending';
|
|
92
|
+
};
|
|
93
|
+
export interface ActionRequest {
|
|
94
|
+
context: SecurityContext;
|
|
95
|
+
signal: AbortSignal; /** Nonsecret reference. Adapter privately owns challenge/token material. */
|
|
96
|
+
challengeId?: string;
|
|
97
|
+
}
|
|
98
|
+
export type SecurityActions = {
|
|
99
|
+
[K in SecurityOperation]?: (input: SecurityInputs[K], request: ActionRequest) => Promise<ResultFor<K> & {
|
|
100
|
+
context: SecurityContext;
|
|
101
|
+
}>;
|
|
102
|
+
};
|
|
103
|
+
export interface SecuritySnapshot {
|
|
104
|
+
context: SecurityContext;
|
|
105
|
+
status: 'ready' | 'loading' | 'denied' | 'unavailable';
|
|
106
|
+
emailStatus?: 'pending' | 'verified' | 'expired';
|
|
107
|
+
sessions?: readonly {
|
|
108
|
+
id: string;
|
|
109
|
+
label: string;
|
|
110
|
+
current: boolean;
|
|
111
|
+
detail?: string;
|
|
112
|
+
}[];
|
|
113
|
+
passkeys?: readonly {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
detail?: string;
|
|
117
|
+
}[];
|
|
118
|
+
activity?: readonly {
|
|
119
|
+
id: string;
|
|
120
|
+
label: string;
|
|
121
|
+
detail?: string;
|
|
122
|
+
}[];
|
|
123
|
+
recoveryMethods?: readonly {
|
|
124
|
+
id: string;
|
|
125
|
+
label: string;
|
|
126
|
+
detail?: string;
|
|
127
|
+
}[];
|
|
128
|
+
notifications?: readonly {
|
|
129
|
+
id: string;
|
|
130
|
+
label: string;
|
|
131
|
+
detail?: string;
|
|
132
|
+
}[];
|
|
133
|
+
recoveryStatus?: 'pending' | 'confirmed' | 'denied' | 'expired' | 'unavailable';
|
|
134
|
+
}
|
|
135
|
+
export interface SecurityMessages {
|
|
136
|
+
modules: Record<SecurityModule, string>;
|
|
137
|
+
actions: Record<SecurityOperation, string>;
|
|
138
|
+
states: Record<Failure | 'ready' | 'loading' | 'confirmed' | 'pending' | 'accepted' | 'verified' | 'empty', string>;
|
|
139
|
+
fields: Record<'currentPassword' | 'newPassword' | 'confirmPassword' | 'email' | 'code' | 'name' | 'credentialId' | 'sessionId', string>;
|
|
140
|
+
submit: string;
|
|
141
|
+
cancel: string;
|
|
142
|
+
confirm: string;
|
|
143
|
+
choose: string;
|
|
144
|
+
show: string;
|
|
145
|
+
hide: string;
|
|
146
|
+
dismiss: string;
|
|
147
|
+
activity: string;
|
|
148
|
+
recoveryMethods: string;
|
|
149
|
+
notifications: string;
|
|
150
|
+
currentSession: string;
|
|
151
|
+
lostDevice: string;
|
|
152
|
+
help: string;
|
|
153
|
+
mismatch: string;
|
|
154
|
+
requirements: string;
|
|
155
|
+
recoveryCodes: string;
|
|
156
|
+
enrollment: string;
|
|
157
|
+
reauthenticate: string;
|
|
158
|
+
}
|
|
159
|
+
export interface SecurityExperienceProps {
|
|
160
|
+
context: SecurityContext;
|
|
161
|
+
snapshot: SecuritySnapshot;
|
|
162
|
+
actions: SecurityActions;
|
|
163
|
+
/** Display grants only. Server must reauthorize every action. */
|
|
164
|
+
capabilities: readonly SecurityOperation[];
|
|
165
|
+
/** Both are required for their respective operation group. Product verifies actual support. */
|
|
166
|
+
support?: {
|
|
167
|
+
mfa?: boolean;
|
|
168
|
+
webAuthn?: boolean;
|
|
169
|
+
};
|
|
170
|
+
challenge?: {
|
|
171
|
+
id: string;
|
|
172
|
+
status: 'valid' | 'expired' | 'invalid';
|
|
173
|
+
expiresAt: number;
|
|
174
|
+
};
|
|
175
|
+
messages: SecurityMessages;
|
|
176
|
+
layout?: 'panel' | 'embedded' | 'standalone';
|
|
177
|
+
locale?: string;
|
|
178
|
+
dir?: 'ltr' | 'rtl';
|
|
179
|
+
passwordRequirements?: readonly string[];
|
|
180
|
+
/** Optional UX validation only; backend owns password policy. Return a localized safe error. */
|
|
181
|
+
validatePassword?: (password: string) => string | undefined;
|
|
182
|
+
/** Navigation/presentation only. Does not authenticate and never automatically retries an action. */
|
|
183
|
+
onReauthenticate?: () => void;
|
|
184
|
+
/** Safe product-owned help/navigation; never substitutes for verified recovery. */
|
|
185
|
+
onHelp?: () => void;
|
|
186
|
+
/** Product owns status refresh. Only called for nonsensitive confirmed outcomes. */
|
|
187
|
+
onConfirmed?: (operation: SecurityOperation) => void | Promise<void>;
|
|
188
|
+
now?: () => number;
|
|
189
|
+
header?: ReactNode;
|
|
190
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":""}
|
package/dist/email.d.ts
ADDED
package/dist/email.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function EmailVerificationExperience(props) { return _jsx(SecurityExperience, { ...props, module: "email" }); }
|
|
5
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../src/email.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,2BAA2B,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,OAAO,GAAE,CAAA,CAAA,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Button, Input } from '@consciousclouds/ui';
|
|
5
|
+
const groups = { password: ['changePassword', 'forgotPassword', 'resetPassword'], email: ['resendVerification', 'verifyEmail', 'changeEmail', 'confirmEmailChange'], mfa: ['enrollMfa', 'verifyMfa', 'recoveryCodes', 'removeMfa'], passkeys: ['registerPasskey', 'authenticatePasskey', 'renamePasskey', 'removePasskey'], sessions: ['revokeSession', 'revokeOthers', 'revokeEverywhere'], recovery: ['requestRecovery', 'checkRecovery'], overview: [] };
|
|
6
|
+
const fields = { changePassword: ['currentPassword', 'newPassword', 'confirmPassword'], forgotPassword: ['email'], resetPassword: ['newPassword', 'confirmPassword'], resendVerification: [], verifyEmail: [], changeEmail: ['email'], confirmEmailChange: [], enrollMfa: [], verifyMfa: ['code'], recoveryCodes: [], removeMfa: [], registerPasskey: ['name'], authenticatePasskey: [], renamePasskey: ['credentialId', 'name'], removePasskey: ['credentialId'], revokeSession: ['sessionId'], revokeOthers: [], revokeEverywhere: [], requestRecovery: ['email'], checkRecovery: [] };
|
|
7
|
+
const challenges = ['resetPassword', 'verifyEmail', 'confirmEmailChange', 'verifyMfa', 'checkRecovery'];
|
|
8
|
+
const destructive = ['removeMfa', 'removePasskey', 'revokeSession', 'revokeOthers', 'revokeEverywhere'];
|
|
9
|
+
const identity = (c) => JSON.stringify([c.accountKey, c.projectKey, c.issuer, c.revision]);
|
|
10
|
+
const clock = () => Date.now();
|
|
11
|
+
export function SecurityExperience(props) {
|
|
12
|
+
// Synchronous keyed remount prevents a single frame of another account's information.
|
|
13
|
+
const key = props.module + identity(props.context) + JSON.stringify([identity(props.snapshot.context), props.snapshot.status, props.capabilities, props.support, props.challenge, Object.keys(props.actions).filter(key => typeof props.actions[key] === 'function').sort()]);
|
|
14
|
+
return _jsx(SecurityPanel, { ...props }, key);
|
|
15
|
+
}
|
|
16
|
+
function SecurityPanel(p) {
|
|
17
|
+
const m = p.messages, now = p.now ?? clock, id = React.useId(), [operation, setOperation] = React.useState(), [values, setValues] = React.useState({}), [show, setShow] = React.useState(false), [result, setResult] = React.useState(), [error, setError] = React.useState(''), [busy, setBusy] = React.useState(false), [confirm, setConfirm] = React.useState(false), [tick, setTick] = React.useState(0);
|
|
18
|
+
const request = React.useRef(undefined), epoch = React.useRef(0), locked = React.useRef(false), alive = React.useRef(true), status = React.useRef(null), heading = React.useRef(null), trigger = React.useRef(undefined);
|
|
19
|
+
const validContext = identity(p.context) === identity(p.snapshot.context);
|
|
20
|
+
const supported = (op) => p.capabilities.includes(op) && !!p.actions[op] && (!groups.mfa.includes(op) || p.support?.mfa === true) && (!groups.passkeys.includes(op) || p.support?.webAuthn === true);
|
|
21
|
+
const challengeState = () => !p.challenge ? 'unavailable' : p.challenge.status !== 'valid' ? p.challenge.status : !Number.isFinite(p.challenge.expiresAt) ? 'invalid' : p.challenge.expiresAt <= now() ? 'expired' : undefined;
|
|
22
|
+
const clear = () => { epoch.current++; request.current?.abort(); locked.current = false; setBusy(false); setValues({}); setShow(false); setConfirm(false); setResult(undefined); setError(''); };
|
|
23
|
+
React.useEffect(() => { alive.current = true; return () => { alive.current = false; epoch.current++; request.current?.abort(); }; }, []);
|
|
24
|
+
React.useEffect(() => { const timer = setInterval(() => setTick(n => n + 1), 250); return () => clearInterval(timer); }, []);
|
|
25
|
+
React.useEffect(() => { if (result && (result.status === 'enrollment' || result.status === 'recovery-codes') && result.expiresAt <= now()) {
|
|
26
|
+
setResult({ status: 'expired' });
|
|
27
|
+
setValues({});
|
|
28
|
+
} if (operation && challenges.includes(operation) && challengeState() && result?.status !== challengeState()) {
|
|
29
|
+
request.current?.abort();
|
|
30
|
+
epoch.current++;
|
|
31
|
+
locked.current = false;
|
|
32
|
+
setBusy(false);
|
|
33
|
+
setValues({});
|
|
34
|
+
setResult({ status: challengeState() });
|
|
35
|
+
} }, [tick]);
|
|
36
|
+
React.useEffect(() => { if (result || error)
|
|
37
|
+
status.current?.focus(); }, [result, error]);
|
|
38
|
+
React.useEffect(() => { if (operation)
|
|
39
|
+
heading.current?.focus();
|
|
40
|
+
else if (trigger.current)
|
|
41
|
+
document.getElementById(trigger.current)?.focus(); }, [operation]);
|
|
42
|
+
const close = () => { clear(); setOperation(undefined); };
|
|
43
|
+
async function submit(event) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
if (!operation || locked.current || !supported(operation) || !validContext || p.snapshot.status !== 'ready')
|
|
46
|
+
return;
|
|
47
|
+
const expired = challenges.includes(operation) ? challengeState() : undefined;
|
|
48
|
+
if (expired) {
|
|
49
|
+
setResult({ status: expired });
|
|
50
|
+
setValues({});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (values.newPassword !== undefined) {
|
|
54
|
+
if (values.newPassword !== values.confirmPassword) {
|
|
55
|
+
setError(m.mismatch);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const invalid = p.validatePassword?.(values.newPassword);
|
|
59
|
+
if (invalid) {
|
|
60
|
+
setError(invalid);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (destructive.includes(operation) && !confirm) {
|
|
65
|
+
setConfirm(true);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
locked.current = true;
|
|
69
|
+
setBusy(true);
|
|
70
|
+
setError('');
|
|
71
|
+
setResult(undefined);
|
|
72
|
+
const seq = ++epoch.current;
|
|
73
|
+
request.current?.abort();
|
|
74
|
+
const controller = new AbortController();
|
|
75
|
+
request.current = controller;
|
|
76
|
+
// Copy only the operation's typed input; confirmation and challenge secrets are never forwarded.
|
|
77
|
+
const input = Object.fromEntries(fields[operation].filter(f => f !== 'confirmPassword').map(f => [f, values[f] ?? '']));
|
|
78
|
+
setValues({});
|
|
79
|
+
setShow(false);
|
|
80
|
+
try {
|
|
81
|
+
// Runtime selection is confined here; the public mapped API preserves operation/input/result typing.
|
|
82
|
+
const action = p.actions[operation];
|
|
83
|
+
const response = await action(input, { context: p.context, signal: controller.signal, challengeId: p.challenge?.id });
|
|
84
|
+
if (!alive.current || seq !== epoch.current || controller.signal.aborted)
|
|
85
|
+
return;
|
|
86
|
+
if (identity(response.context) !== identity(p.context)) {
|
|
87
|
+
setResult({ status: 'unavailable' });
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const expiredAfter = challenges.includes(operation) ? challengeState() : undefined;
|
|
91
|
+
if (expiredAfter) {
|
|
92
|
+
setResult({ status: expiredAfter });
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// Protect enumeration and sensitive payload boundaries even from incorrectly typed adapters.
|
|
96
|
+
const failures = ['failed', 'unknown', 'denied', 'unavailable', 'expired', 'invalid', 'conflict', 'reauthentication-required'];
|
|
97
|
+
const safe = operation === 'forgotPassword' || operation === 'requestRecovery';
|
|
98
|
+
const allowed = failures.includes(response.status) || (safe ? response.status === 'accepted' : operation === 'enrollMfa' ? response.status === 'enrollment' : operation === 'recoveryCodes' ? response.status === 'recovery-codes' : ['confirmed', 'pending'].includes(response.status));
|
|
99
|
+
if (!allowed) {
|
|
100
|
+
setResult({ status: 'unavailable' });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (safe && !['accepted', 'failed', 'unknown', 'denied', 'unavailable', 'expired', 'conflict', 'reauthentication-required'].includes(response.status)) {
|
|
104
|
+
setResult({ status: 'unavailable' });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if ((response.status === 'enrollment' && operation !== 'enrollMfa') || (response.status === 'recovery-codes' && operation !== 'recoveryCodes')) {
|
|
108
|
+
setResult({ status: 'unavailable' });
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if ((response.status === 'enrollment' || response.status === 'recovery-codes') && (!Number.isFinite(response.expiresAt) || response.expiresAt <= now())) {
|
|
112
|
+
setResult({ status: 'expired' });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (response.status === 'enrollment' && (!response.secret || typeof response.secret !== 'string')) {
|
|
116
|
+
setResult({ status: 'unavailable' });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (response.status === 'recovery-codes' && (!Array.isArray(response.codes) || !response.codes.length || !response.codes.every(code => typeof code === 'string' && code.length > 0))) {
|
|
120
|
+
setResult({ status: 'unavailable' });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
setResult(response);
|
|
124
|
+
if (response.status === 'confirmed') {
|
|
125
|
+
try {
|
|
126
|
+
await p.onConfirmed?.(operation);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
if (alive.current && seq === epoch.current)
|
|
130
|
+
setResult({ status: 'unknown' });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
if (alive.current && seq === epoch.current)
|
|
136
|
+
setResult({ status: 'unknown' });
|
|
137
|
+
}
|
|
138
|
+
finally {
|
|
139
|
+
if (alive.current && seq === epoch.current) {
|
|
140
|
+
locked.current = false;
|
|
141
|
+
setBusy(false);
|
|
142
|
+
setConfirm(false);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const ready = validContext && p.snapshot.status === 'ready';
|
|
147
|
+
const list = p.module === 'sessions' ? p.snapshot.sessions : p.module === 'passkeys' ? p.snapshot.passkeys : undefined;
|
|
148
|
+
const actions = groups[p.module].filter(supported);
|
|
149
|
+
const secret = result?.status === 'enrollment' || result?.status === 'recovery-codes';
|
|
150
|
+
const state = !validContext ? 'unavailable' : p.snapshot.status !== 'ready' ? p.snapshot.status : busy ? 'loading' : result && !secret ? result.status : undefined;
|
|
151
|
+
return _jsxs("section", { className: "cc-security", "data-layout": p.layout ?? 'panel', lang: p.locale, dir: p.dir, "aria-labelledby": id + '-title', children: [p.header, _jsx("h2", { id: id + '-title', children: m.modules[p.module] }), _jsx("p", { ref: status, tabIndex: -1, role: error ? 'alert' : 'status', "aria-live": "polite", children: error || (state ? m.states[state] : m.states.ready) }), ready && _jsxs(_Fragment, { children: [p.module === 'email' && p.snapshot.emailStatus && _jsx("p", { children: m.states[p.snapshot.emailStatus] }), p.module === 'recovery' && _jsxs("div", { children: [_jsx("p", { children: m.lostDevice }), p.onHelp && _jsx(Button, { type: "button", onClick: p.onHelp, children: m.help })] }), p.module === 'recovery' && p.snapshot.recoveryStatus && _jsx("p", { children: m.states[p.snapshot.recoveryStatus] }), p.module === 'overview' && ['activity', 'recoveryMethods', 'notifications'].map(group => _jsxs("div", { children: [_jsx("h3", { children: m[group] }), p.snapshot[group]?.length ? _jsx("ul", { className: "cc-security-list", children: p.snapshot[group].map(item => _jsxs("li", { children: [_jsx("strong", { children: item.label }), _jsx("p", { children: item.detail })] }, item.id)) }) : _jsx("p", { children: m.states.empty })] }, group)), list && _jsx("ul", { className: "cc-security-list", children: list.map((item, i) => _jsxs("li", { children: [_jsx("strong", { children: 'name' in item ? item.name : item.label }), 'current' in item && item.current && _jsxs("span", { children: [" \u2014 ", m.currentSession] }), _jsx("p", { children: item.detail })] }, item.id + '-' + i)) }), list?.length === 0 && _jsx("p", { children: m.states.empty }), !operation && _jsxs("div", { className: "cc-security-actions", children: [actions.map(op => _jsx(Button, { id: id + op, type: "button", onClick: e => { clear(); trigger.current = e.currentTarget.id; setOperation(op); }, children: m.actions[op] }, op)), !actions.length && p.module !== 'overview' && _jsx("p", { children: m.states.unavailable })] }), operation && _jsxs("form", { onSubmit: submit, "aria-labelledby": id + '-action', children: [_jsx("h3", { ref: heading, tabIndex: -1, id: id + '-action', children: m.actions[operation] }), fields[operation].includes('newPassword') && p.passwordRequirements && _jsxs("div", { children: [_jsx("h4", { children: m.requirements }), _jsx("ul", { children: p.passwordRequirements.map((v, i) => _jsx("li", { children: v }, i)) })] }), !secret && fields[operation].map(f => _jsxs("div", { className: "cc-security-field", children: [_jsx("label", { htmlFor: id + f, children: m.fields[f] }), f === 'credentialId' || f === 'sessionId' ? _jsxs("select", { id: id + f, required: true, disabled: busy, value: values[f] ?? '', onChange: e => { setConfirm(false); setValues(v => ({ ...v, [f]: e.target.value })); }, children: [_jsx("option", { value: "", children: m.choose }), (f === 'credentialId' ? p.snapshot.passkeys ?? [] : p.snapshot.sessions ?? []).map(x => _jsx("option", { value: x.id, children: 'name' in x ? x.name : x.label }, x.id))] }) : _jsx(Input, { id: id + f, required: true, disabled: busy, value: values[f] ?? '', type: f.toLowerCase().includes('password') && !show ? 'password' : f === 'email' ? 'email' : 'text', autoComplete: f === 'currentPassword' ? 'current-password' : f === 'newPassword' || f === 'confirmPassword' ? 'new-password' : f === 'code' ? 'one-time-code' : f === 'email' ? 'email' : 'off', onChange: e => { setConfirm(false); setValues(v => ({ ...v, [f]: e.target.value })); setError(''); } })] }, f)), !secret && fields[operation].some(f => f.toLowerCase().includes('password')) && _jsx(Button, { type: "button", "aria-pressed": show, onClick: () => setShow(v => !v), children: show ? m.hide : m.show }), secret && _jsxs("div", { className: "cc-security-sensitive", children: [_jsx("h4", { children: result.status === 'enrollment' ? m.enrollment : m.recoveryCodes }), result.status === 'enrollment' ? _jsx("code", { children: result.secret }) : _jsx("ul", { children: result.codes.map((code, i) => _jsx("li", { children: _jsx("code", { children: code }) }, i)) }), _jsx(Button, { type: "button", onClick: close, children: m.dismiss })] }), confirm && _jsxs("p", { role: "alert", children: [m.confirm, ": ", m.actions[operation]] }), result?.status === 'reauthentication-required' && p.onReauthenticate && _jsx(Button, { type: "button", onClick: () => { close(); p.onReauthenticate?.(); }, children: m.reauthenticate }), _jsxs("div", { className: "cc-security-actions", children: [!secret && _jsx(Button, { type: "submit", disabled: busy || !supported(operation) || (challenges.includes(operation) && !!challengeState()), children: busy ? m.states.loading : confirm ? m.confirm : m.submit }), _jsx(Button, { type: "button", onClick: close, children: m.cancel })] })] })] })] });
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=experience.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experience.js","sourceRoot":"","sources":["../src/experience.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAEjD,MAAM,MAAM,GAAqD,EAAC,QAAQ,EAAC,CAAC,gBAAgB,EAAC,gBAAgB,EAAC,eAAe,CAAC,EAAC,KAAK,EAAC,CAAC,oBAAoB,EAAC,aAAa,EAAC,aAAa,EAAC,oBAAoB,CAAC,EAAC,GAAG,EAAC,CAAC,WAAW,EAAC,WAAW,EAAC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SAAS,CAAC,IAAE,CAAC,CAAC,cAAc,EAAE,CAAC,YAAG,IAAI,CAAA,CAAC,CAAA,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA,CAAC,CAAA,OAAO,CAAA,CAAC,CAAA,CAAC,CAAC,OAAO,CAAA,CAAC,CAAA,CAAC,CAAC,MAAM,GAAU,EAAC,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,KAAK,YAAG,CAAC,CAAC,MAAM,GAAU,IAAM,IACtR,IACJ,IACO,CAAC;AACZ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './contracts.js';
|
|
2
|
+
export * from './messages.js';
|
|
3
|
+
export * from './password.js';
|
|
4
|
+
export * from './email.js';
|
|
5
|
+
export * from './mfa.js';
|
|
6
|
+
export * from './passkeys.js';
|
|
7
|
+
export * from './sessions.js';
|
|
8
|
+
export * from './recovery.js';
|
|
9
|
+
export * from './overview.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './contracts.js';
|
|
2
|
+
export * from './messages.js';
|
|
3
|
+
export * from './password.js';
|
|
4
|
+
export * from './email.js';
|
|
5
|
+
export * from './mfa.js';
|
|
6
|
+
export * from './passkeys.js';
|
|
7
|
+
export * from './sessions.js';
|
|
8
|
+
export * from './recovery.js';
|
|
9
|
+
export * from './overview.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
package/dist/messages.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const englishSecurityMessages = {
|
|
2
|
+
modules: { password: 'Password', email: 'Email verification', mfa: 'Multi-factor authentication', passkeys: 'Passkeys', sessions: 'Sessions', recovery: 'Account recovery', overview: 'Security overview' },
|
|
3
|
+
actions: { changePassword: 'Change password', forgotPassword: 'Forgot password', resetPassword: 'Reset password', resendVerification: 'Resend verification', verifyEmail: 'Verify email', changeEmail: 'Change email', confirmEmailChange: 'Confirm email change', enrollMfa: 'Set up authenticator', verifyMfa: 'Verify authenticator', recoveryCodes: 'Show recovery codes', removeMfa: 'Remove authenticator', registerPasskey: 'Register passkey', authenticatePasskey: 'Use a passkey', renamePasskey: 'Rename passkey', removePasskey: 'Remove passkey', revokeSession: 'Sign out session', revokeOthers: 'Sign out other sessions', revokeEverywhere: 'Sign out everywhere', requestRecovery: 'Recover account', checkRecovery: 'Check recovery status' },
|
|
4
|
+
states: { ready: 'Choose an available action.', loading: 'Working…', confirmed: 'Confirmed by your account provider.', pending: 'Pending confirmation from your account provider.', accepted: 'If this account is eligible, your account provider will send further instructions.', failed: 'The action failed. No success is confirmed.', unknown: 'The outcome is unknown. Check with your account provider before retrying.', denied: 'You do not have access to this action.', unavailable: 'This capability is unavailable.', expired: 'This challenge has expired. Request a new one through your account provider.', invalid: 'This challenge is invalid. Contact your account provider.', conflict: 'Account state has changed. Refresh before trying again.', 'reauthentication-required': 'Your account provider requires you to authenticate again.', verified: 'Verified', empty: 'No information is available.' },
|
|
5
|
+
fields: { currentPassword: 'Current password', newPassword: 'New password', confirmPassword: 'Confirm new password', email: 'Email address', code: 'Authenticator code', name: 'Passkey name', credentialId: 'Passkey', sessionId: 'Session' },
|
|
6
|
+
activity: 'Recent security activity', recoveryMethods: 'Recovery methods', notifications: 'Security notifications', currentSession: 'Current session', lostDevice: 'Lost your device or access to a recovery method? Your account provider must verify recovery before access is restored.', help: 'Contact account support', submit: 'Continue', cancel: 'Cancel', confirm: 'Confirm action', choose: 'Choose', show: 'Show passwords', hide: 'Hide passwords', dismiss: 'Dismiss sensitive information', mismatch: 'Passwords must match.', requirements: 'Password requirements', recoveryCodes: 'Recovery codes — store securely using your own trusted method', enrollment: 'Authenticator setup key — enter in your authenticator', reauthenticate: 'Authenticate again'
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACrD,OAAO,EAAC,EAAC,QAAQ,EAAC,UAAU,EAAC,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAC,6BAA6B,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,kBAAkB,EAAC,QAAQ,EAAC,mBAAmB,EAAC;IAC3L,OAAO,EAAC,EAAC,cAAc,EAAC,iBAAiB,EAAC,cAAc,EAAC,iBAAiB,EAAC,aAAa,EAAC,gBAAgB,EAAC,kBAAkB,EAAC,qBAAqB,EAAC,WAAW,EAAC,cAAc,EAAC,WAAW,EAAC,cAAc,EAAC,kBAAkB,EAAC,sBAAsB,EAAC,SAAS,EAAC,sBAAsB,EAAC,SAAS,EAAC,sBAAsB,EAAC,aAAa,EAAC,qBAAqB,EAAC,SAAS,EAAC,sBAAsB,EAAC,eAAe,EAAC,kBAAkB,EAAC,mBAAmB,EAAC,eAAe,EAAC,aAAa,EAAC,gBAAgB,EAAC,aAAa,EAAC,gBAAgB,EAAC,aAAa,EAAC,kBAAkB,EAAC,YAAY,EAAC,yBAAyB,EAAC,gBAAgB,EAAC,qBAAqB,EAAC,eAAe,EAAC,iBAAiB,EAAC,aAAa,EAAC,uBAAuB,EAAC;IACtrB,MAAM,EAAC,EAAC,KAAK,EAAC,6BAA6B,EAAC,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,qCAAq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b,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,aAAa,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,KAAK,GAAE,CAAA,CAAA,CAAC"}
|
package/dist/overview.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function SecurityOverviewExperience(props) { return _jsx(SecurityExperience, { ...props, module: "overview" }); }
|
|
5
|
+
//# sourceMappingURL=overview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../src/overview.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,0BAA0B,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,UAAU,GAAE,CAAA,CAAA,CAAC"}
|
package/dist/passkeys.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function PasskeysExperience(props) { return _jsx(SecurityExperience, { ...props, module: "passkeys" }); }
|
|
5
|
+
//# sourceMappingURL=passkeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeys.js","sourceRoot":"","sources":["../src/passkeys.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,kBAAkB,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,UAAU,GAAE,CAAA,CAAA,CAAC"}
|
package/dist/password.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function PasswordExperience(props) { return _jsx(SecurityExperience, { ...props, module: "password" }); }
|
|
5
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../src/password.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,kBAAkB,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,UAAU,GAAE,CAAA,CAAA,CAAC"}
|
package/dist/recovery.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function RecoveryExperience(props) { return _jsx(SecurityExperience, { ...props, module: "recovery" }); }
|
|
5
|
+
//# sourceMappingURL=recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery.js","sourceRoot":"","sources":["../src/recovery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,kBAAkB,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,UAAU,GAAE,CAAA,CAAA,CAAC"}
|
package/dist/sessions.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SecurityExperience } from './experience.js';
|
|
4
|
+
export function SessionsExperience(props) { return _jsx(SecurityExperience, { ...props, module: "sessions" }); }
|
|
5
|
+
//# sourceMappingURL=sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../src/sessions.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,kBAAkB,CAAC,KAA6B,IAAE,OAAO,KAAC,kBAAkB,OAAK,KAAK,EAAE,MAAM,EAAC,UAAU,GAAE,CAAA,CAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consciousclouds/account-security-experience",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Optional capability-gated React account security and recovery presentation",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./styles/security.css",
|
|
15
|
+
"./password": {
|
|
16
|
+
"types": "./dist/password.d.ts",
|
|
17
|
+
"import": "./dist/password.js"
|
|
18
|
+
},
|
|
19
|
+
"./email": {
|
|
20
|
+
"types": "./dist/email.d.ts",
|
|
21
|
+
"import": "./dist/email.js"
|
|
22
|
+
},
|
|
23
|
+
"./mfa": {
|
|
24
|
+
"types": "./dist/mfa.d.ts",
|
|
25
|
+
"import": "./dist/mfa.js"
|
|
26
|
+
},
|
|
27
|
+
"./passkeys": {
|
|
28
|
+
"types": "./dist/passkeys.d.ts",
|
|
29
|
+
"import": "./dist/passkeys.js"
|
|
30
|
+
},
|
|
31
|
+
"./sessions": {
|
|
32
|
+
"types": "./dist/sessions.d.ts",
|
|
33
|
+
"import": "./dist/sessions.js"
|
|
34
|
+
},
|
|
35
|
+
"./recovery": {
|
|
36
|
+
"types": "./dist/recovery.d.ts",
|
|
37
|
+
"import": "./dist/recovery.js"
|
|
38
|
+
},
|
|
39
|
+
"./overview": {
|
|
40
|
+
"types": "./dist/overview.d.ts",
|
|
41
|
+
"import": "./dist/overview.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"styles",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"**/*.css"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsc -p tsconfig.build.json",
|
|
55
|
+
"type-check": "tsc --noEmit",
|
|
56
|
+
"prepack": "npm run build && npm run type-check"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@consciousclouds/ui": "^0.2.0"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"react": "^19.0.0",
|
|
63
|
+
"react-dom": "^19.0.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"typescript": "5.9.3",
|
|
67
|
+
"@types/react": "19.2.14",
|
|
68
|
+
"@types/react-dom": "19.2.3",
|
|
69
|
+
"react": "19.2.4",
|
|
70
|
+
"react-dom": "19.2.4"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
.cc-security{box-sizing:border-box;min-width:0;max-width:100%;padding:1rem;border:1px solid hsl(var(--border));border-radius:.75rem;background:hsl(var(--background));color:hsl(var(--foreground));container-type:inline-size;overflow-wrap:anywhere}
|
|
2
|
+
.cc-security[data-layout=embedded]{border:0;padding:.5rem}.cc-security[data-layout=standalone]{max-width:48rem;margin-inline:auto;padding:clamp(.75rem,3vw,2rem)}
|
|
3
|
+
.cc-security *{box-sizing:border-box;min-width:0}.cc-security h2,.cc-security h3,.cc-security h4{font-weight:600;margin-block:0 1rem}.cc-security p{margin-block:.5rem 1rem}.cc-security form{display:grid;gap:1rem}.cc-security-field{display:grid;gap:.5rem}.cc-security input,.cc-security select{width:100%;max-width:100%;min-height:44px;background:hsl(var(--background));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:.375rem;padding:.5rem}
|
|
4
|
+
.cc-security button{min-height:44px;max-width:100%;height:auto;white-space:normal;overflow-wrap:anywhere}.cc-security-actions{display:flex;flex-wrap:wrap;gap:.5rem}.cc-security-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:.75rem;padding:0;list-style:none}.cc-security-list li,.cc-security-sensitive{border:1px solid hsl(var(--border));padding:.75rem;border-radius:.375rem}.cc-security :focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.cc-security code{white-space:pre-wrap;overflow-wrap:anywhere}.cc-security [role=status]:empty{display:none}
|
|
5
|
+
@container(max-width:400px){.cc-security-actions{flex-direction:column}.cc-security-actions button{width:100%}}
|
|
6
|
+
@media(prefers-reduced-motion:reduce){.cc-security *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
|