@auth-link/web 0.0.0-stage → 0.0.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,62 @@
1
+ # Changelog
2
+
3
+ ## 0.0.2 — 2026-10-30
4
+
5
+ - Support explicitly allowed cross-origin application backends with configurable fetch credentials, per-request Bearer tokens, extra headers and framework CSRF header names. Same-origin session clients remain the default.
6
+ - Require CSRF when cookies may be sent, validate backend destinations before reading credentials, protect managed headers, and include credential-provider waits in cancellation and timeout handling.
7
+ - Replace the rejected-origin error `CMS_ORIGIN_REQUIRED` with `BACKEND_ORIGIN_NOT_ALLOWED` and export `ClientOptions`.
8
+ - Explain the session CSRF token source, backend validation and concrete client helper in all three integration guides.
9
+ - Provide complete React binding/confirmation handlers and a Vue example, including request creation and dialog cleanup.
10
+ - Fix Vue refresh callbacks retaining old parent state; update refresh-button availability when the handler is added or removed.
11
+ - Apply the declared Vue `className` prop alongside Vue string, array and object `class` attributes.
12
+ - Release the web package under the MIT license, including the license text in the npm archive.
13
+
14
+ ## 0.0.1 — 2026-10-30
15
+
16
+ - Start the new `@auth-link/web` package under the `auth-link` npm organization.
17
+ - Keep each refresh period on a fixed monotonic deadline so rounded server timestamps and network delays cannot make the bar jump; ignore stale periods.
18
+
19
+ ### Included changes from earlier local builds
20
+
21
+ - Animate the refresh bar continuously using animation frames and monotonic server timing, reset immediately at code rollover, and stop animation when the dialog closes or reduced motion is enabled.
22
+
23
+ - Replace dual countdowns with a thin refresh bar and static caption; show request expiry only in the final 30 seconds, with a subdued warning and reduced-motion-aware code transitions in all three layouts.
24
+
25
+ - Close rejected dialogs automatically; return typed `Rejection` payloads (`code: REJECTED`) through JavaScript, React and Vue callbacks without a rejection/retry panel or user-close event.
26
+
27
+ - Add A (default minimal), B (split) and C (compact / mobile sheet) via `variant`, including reactive React/Vue updates and `modal.setVariant()`.
28
+ - Replace the oversized close control with a small icon and 44px target; add translated footer cancellation to B/C.
29
+
30
+ - Default dialogs to Simplified Chinese; keep all explicit language selections.
31
+
32
+ - Automatically dismiss confirmed dialogs while delivering the success callback once.
33
+ - Open responsive native dialogs with openAuthLinkBind / openAuthLinkConfirm from any framework.
34
+ - React / Vue components now open dialogs on mount; use onClose / @close to unmount. SSR renders no dialog.
35
+ - Add localized close controls, Escape handling, focus/scroll restoration and abort-on-close.
36
+ - Move the client package and mobile app into the c_auth_link repository.
37
+
38
+
39
+ ## Historical local builds (not npm releases)
40
+
41
+ The versions below predate the `@auth-link/web` npm package. Their applicable features were included in 0.0.1; they are not pending npm releases. Later changes above supersede historical defaults.
42
+
43
+ ### Local 0.1.2
44
+
45
+ - Use the single `device-presence.v1` protocol: original-phone hardware proof and in-app approval. Remove legacy authentication policy support.
46
+ - Update English, Chinese and Japanese guides for mobile protocol 7.
47
+
48
+
49
+ ### Local 0.1.1
50
+
51
+ - Add Bengali, Spanish, Filipino, Hindi, Indonesian, Malay, Portuguese, Thai and Vietnamese panel translations; retain English, Simplified/Traditional Chinese and Japanese.
52
+ - Default both React and Vue panels to English, including unsupported-locale fallback and accessible language attributes.
53
+ - Add English (default), Chinese and Japanese integration guides and language links.
54
+ - Use platform-neutral package metadata; remove local paths and maintainer publishing instructions from public documentation.
55
+ - Export `supportedLocales` for host language pickers.
56
+
57
+ ### Local 0.1.0
58
+
59
+ - React/Vue 绑定二维码、30 秒动态核对码、请求/数字双倒计时。
60
+ - 同源 application 客户端、CSRF、创建幂等键、取消与组件生命周期管理。
61
+ - 确认/拒绝/过期/错误事件,消费后才确认,卸载后屏蔽迟到响应。
62
+ - TypeScript、四种语言、独立 CSS、无浏览器 seed 或租户密钥。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 auth-link
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.