@auth-link/web 0.0.3 → 0.0.4

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.4 — 2026-10-30
4
+
5
+ - Use the production AuthLink API origin `https://api.getauthlink.com` throughout all integration guides and initialization examples.
6
+ - Keep application backend/CORS example origins distinct from the AuthLink API and clarify that the marketing website is not an API endpoint. Runtime behavior is unchanged.
7
+
3
8
  ## 0.0.3 — 2026-10-30
4
9
 
5
10
  - Add English, Chinese and Japanese Go CMS + Vue walkthroughs covering the three origins, session bootstrap, CORS/CSRF, persistent creation/consumption and publication tied to a post/version.
package/README.md CHANGED
@@ -70,12 +70,12 @@ export function readCsrfTokenFromYourCms(): string {
70
70
  export const client = createAuthLinkClient({
71
71
  baseUrl: '/api/authlink',
72
72
  csrfToken: readCsrfTokenFromYourCms,
73
- // Replace this example with the configured AuthLink service origin.
74
- authLinkOrigin: 'https://auth.example.com',
73
+ // AuthLink production API origin.
74
+ authLinkOrigin: 'https://api.getauthlink.com',
75
75
  });
76
76
  ```
77
77
 
78
- Replace `https://auth.example.com` with the configured AuthLink origin. Create requests only in user event handlers, as in the React example below.
78
+ AuthLink production uses `https://api.getauthlink.com`. Keep `baseUrl` pointed at your own application backend; the AuthLink website domain is not an API endpoint. For a separately hosted AuthLink service, use that service’s configured origin. Create requests only in user event handlers, as in the React example below.
79
79
 
80
80
  ### Separate frontend and backend origins (since 0.0.2)
81
81
 
@@ -416,7 +416,9 @@ This walkthrough follows a working Go CMS and Vue 3 integration. Example origins
416
416
  | --- | --- | --- |
417
417
  | Vue | `https://cms.example.com` | `apiOrigin` is the Go backend below |
418
418
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
419
- | AuthLink API | `https://auth.example.com` | Go SDK `Origin`; browser `authLinkOrigin` |
419
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK `Origin`; browser `authLinkOrigin` |
420
+
421
+ The AuthLink API uses production origin `https://api.getauthlink.com`; the Vue and Go CMS origins remain examples for your own website, not the AuthLink marketing site.
420
422
 
421
423
  Register the Vue site's origin for the tenant. The Go SDK `Origin` and the API origin in an exported credential JSON identify the AuthLink API. Browser `baseUrl` targets your Go application API. Keep TenantID/APIKey in private backend configuration; public runtime configuration contains origins only.
422
424
 
@@ -742,12 +744,12 @@ export function readCsrfTokenFromYourCms(): string {
742
744
  export const client = createAuthLinkClient({
743
745
  baseUrl: '/api/authlink',
744
746
  csrfToken: readCsrfTokenFromYourCms,
745
- // Replace this example with the configured AuthLink service origin.
746
- authLinkOrigin: 'https://auth.example.com',
747
+ // AuthLink production API origin.
748
+ authLinkOrigin: 'https://api.getauthlink.com',
747
749
  });
748
750
  ```
749
751
 
750
- 把 `https://auth.example.com` 换成实际 AuthLink 服务来源。SDK 会在每次请求时调用读取函数,自动把值放入 `X-CSRF-Token`,并携带同源登录 cookie;前端不需要读取 HttpOnly 登录 cookie。若网站框架默认使用其他 CSRF 头名,可用 `csrfHeaderName` 配成后台期望的头名,或者实现自定义 `AuthLinkClient`。
752
+ AuthLink 生产服务来源为 `https://api.getauthlink.com`。`baseUrl` 仍填写你自己的网站业务后台,官网域名不用于接口调用;连接独立部署的 AuthLink 服务时才按其配置调整来源。SDK 会在每次请求时调用读取函数,自动把值放入 `X-CSRF-Token`,并携带同源登录 cookie;前端不需要读取 HttpOnly 登录 cookie。若网站框架默认使用其他 CSRF 头名,可用 `csrfHeaderName` 配成后台期望的头名,或者实现自定义 `AuthLinkClient`。
751
753
 
752
754
  `create` 只传用途,网站账号由后台登录 session 决定。客户端通常只初始化一次;用户点击按钮时才创建请求。完整调用见下方 React 示例,不要把 `client.create()` 放在模块加载、React effect 或 Vue watch 中。
753
755
 
@@ -1145,7 +1147,9 @@ MIT。完整许可文本见 `LICENSE`,打包包含的第三方库归属说明
1145
1147
  | --- | --- | --- |
1146
1148
  | Vue | `https://cms.example.com` | `apiOrigin` 指向下方的 Go 后台 |
1147
1149
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
1148
- | AuthLink API | `https://auth.example.com` | Go SDK 的 `Origin`;浏览器的 `authLinkOrigin` |
1150
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK 的 `Origin`;浏览器的 `authLinkOrigin` |
1151
+
1152
+ AuthLink API 使用生产地址 `https://api.getauthlink.com`;Vue 网站和 Go CMS 的域名仍是接入方自己的示例,不能替换成 AuthLink 官网域名。
1149
1153
 
1150
1154
  登记租户的站点 origin 是 Vue 网站来源;Go SDK 的 `Origin` 和凭据导出 JSON 中的 API origin 是 AuthLink API 来源。浏览器的 `baseUrl` 指向 Go 业务后台,不能指向 AuthLink 租户 API。公开运行配置只包含这三个 origin;`TenantID`、`APIKey` 保留在 Go 私密配置或环境变量中。
1151
1155
 
@@ -1462,12 +1466,12 @@ export function readCsrfTokenFromYourCms(): string {
1462
1466
  export const client = createAuthLinkClient({
1463
1467
  baseUrl: '/api/authlink',
1464
1468
  csrfToken: readCsrfTokenFromYourCms,
1465
- // Replace this example with the configured AuthLink service origin.
1466
- authLinkOrigin: 'https://auth.example.com',
1469
+ // AuthLink production API origin.
1470
+ authLinkOrigin: 'https://api.getauthlink.com',
1467
1471
  });
1468
1472
  ```
1469
1473
 
1470
- `https://auth.example.com` は実際の AuthLink オリジンに置き換えてください。リクエストは下記の React 例のようにユーザー操作で作成します。
1474
+ AuthLink の本番 API は `https://api.getauthlink.com` です。baseUrl は自サイトの業務バックエンドを指し、AuthLink 公式サイトのドメインは API に使いません。独自に配置したサービスへ接続する場合は、その設定済み origin を使用します。リクエストは下記の React 例のようにユーザー操作で作成します。
1471
1475
 
1472
1476
  ### フロントエンドとバックエンドの別オリジン対応(0.0.2 以降)
1473
1477
 
@@ -1808,7 +1812,9 @@ MIT。ライセンス全文は `LICENSE`、同梱ライブラリの帰属表示
1808
1812
  | --- | --- | --- |
1809
1813
  | Vue | `https://cms.example.com` | `apiOrigin` は下記 Go バックエンド |
1810
1814
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
1811
- | AuthLink API | `https://auth.example.com` | Go SDK の `Origin`;ブラウザーの `authLinkOrigin` |
1815
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK の `Origin`;ブラウザーの `authLinkOrigin` |
1816
+
1817
+ AuthLink API は本番の `https://api.getauthlink.com` を使います。Vue と Go CMS の origin は接続先サイト自身の例であり、AuthLink 公式サイトのドメインへ置き換えません。
1812
1818
 
1813
1819
  テナントに登録するサイト origin は Vue の origin です。Go SDK の Origin と資格情報 JSON の API origin は AuthLink API を指します。ブラウザーの baseUrl は Go の業務 API です。TenantID/APIKey はバックエンドの非公開設定にのみ保存します。
1814
1820
 
package/docs/README.en.md CHANGED
@@ -68,12 +68,12 @@ export function readCsrfTokenFromYourCms(): string {
68
68
  export const client = createAuthLinkClient({
69
69
  baseUrl: '/api/authlink',
70
70
  csrfToken: readCsrfTokenFromYourCms,
71
- // Replace this example with the configured AuthLink service origin.
72
- authLinkOrigin: 'https://auth.example.com',
71
+ // AuthLink production API origin.
72
+ authLinkOrigin: 'https://api.getauthlink.com',
73
73
  });
74
74
  ```
75
75
 
76
- Replace `https://auth.example.com` with the configured AuthLink origin. Create requests only in user event handlers, as in the React example below.
76
+ AuthLink production uses `https://api.getauthlink.com`. Keep `baseUrl` pointed at your own application backend; the AuthLink website domain is not an API endpoint. For a separately hosted AuthLink service, use that service’s configured origin. Create requests only in user event handlers, as in the React example below.
77
77
 
78
78
  ## Separate frontend and backend origins (since 0.0.2)
79
79
 
package/docs/README.ja.md CHANGED
@@ -68,12 +68,12 @@ export function readCsrfTokenFromYourCms(): string {
68
68
  export const client = createAuthLinkClient({
69
69
  baseUrl: '/api/authlink',
70
70
  csrfToken: readCsrfTokenFromYourCms,
71
- // Replace this example with the configured AuthLink service origin.
72
- authLinkOrigin: 'https://auth.example.com',
71
+ // AuthLink production API origin.
72
+ authLinkOrigin: 'https://api.getauthlink.com',
73
73
  });
74
74
  ```
75
75
 
76
- `https://auth.example.com` は実際の AuthLink オリジンに置き換えてください。リクエストは下記の React 例のようにユーザー操作で作成します。
76
+ AuthLink の本番 API は `https://api.getauthlink.com` です。baseUrl は自サイトの業務バックエンドを指し、AuthLink 公式サイトのドメインは API に使いません。独自に配置したサービスへ接続する場合は、その設定済み origin を使用します。リクエストは下記の React 例のようにユーザー操作で作成します。
77
77
 
78
78
  ## フロントエンドとバックエンドの別オリジン対応(0.0.2 以降)
79
79
 
@@ -81,12 +81,12 @@ export function readCsrfTokenFromYourCms(): string {
81
81
  export const client = createAuthLinkClient({
82
82
  baseUrl: '/api/authlink',
83
83
  csrfToken: readCsrfTokenFromYourCms,
84
- // Replace this example with the configured AuthLink service origin.
85
- authLinkOrigin: 'https://auth.example.com',
84
+ // AuthLink production API origin.
85
+ authLinkOrigin: 'https://api.getauthlink.com',
86
86
  });
87
87
  ```
88
88
 
89
- 把 `https://auth.example.com` 换成实际 AuthLink 服务来源。SDK 会在每次请求时调用读取函数,自动把值放入 `X-CSRF-Token`,并携带同源登录 cookie;前端不需要读取 HttpOnly 登录 cookie。若网站框架默认使用其他 CSRF 头名,可用 `csrfHeaderName` 配成后台期望的头名,或者实现自定义 `AuthLinkClient`。
89
+ AuthLink 生产服务来源为 `https://api.getauthlink.com`。`baseUrl` 仍填写你自己的网站业务后台,官网域名不用于接口调用;连接独立部署的 AuthLink 服务时才按其配置调整来源。SDK 会在每次请求时调用读取函数,自动把值放入 `X-CSRF-Token`,并携带同源登录 cookie;前端不需要读取 HttpOnly 登录 cookie。若网站框架默认使用其他 CSRF 头名,可用 `csrfHeaderName` 配成后台期望的头名,或者实现自定义 `AuthLinkClient`。
90
90
 
91
91
  `create` 只传用途,网站账号由后台登录 session 决定。客户端通常只初始化一次;用户点击按钮时才创建请求。完整调用见下方 React 示例,不要把 `client.create()` 放在模块加载、React effect 或 Vue watch 中。
92
92
 
package/docs/go-vue.en.md CHANGED
@@ -10,7 +10,9 @@ This walkthrough follows a working Go CMS and Vue 3 integration. Example origins
10
10
  | --- | --- | --- |
11
11
  | Vue | `https://cms.example.com` | `apiOrigin` is the Go backend below |
12
12
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
13
- | AuthLink API | `https://auth.example.com` | Go SDK `Origin`; browser `authLinkOrigin` |
13
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK `Origin`; browser `authLinkOrigin` |
14
+
15
+ The AuthLink API uses production origin `https://api.getauthlink.com`; the Vue and Go CMS origins remain examples for your own website, not the AuthLink marketing site.
14
16
 
15
17
  Register the Vue site's origin for the tenant. The Go SDK `Origin` and the API origin in an exported credential JSON identify the AuthLink API. Browser `baseUrl` targets your Go application API. Keep TenantID/APIKey in private backend configuration; public runtime configuration contains origins only.
16
18
 
package/docs/go-vue.ja.md CHANGED
@@ -10,7 +10,9 @@
10
10
  | --- | --- | --- |
11
11
  | Vue | `https://cms.example.com` | `apiOrigin` は下記 Go バックエンド |
12
12
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
13
- | AuthLink API | `https://auth.example.com` | Go SDK の `Origin`;ブラウザーの `authLinkOrigin` |
13
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK の `Origin`;ブラウザーの `authLinkOrigin` |
14
+
15
+ AuthLink API は本番の `https://api.getauthlink.com` を使います。Vue と Go CMS の origin は接続先サイト自身の例であり、AuthLink 公式サイトのドメインへ置き換えません。
14
16
 
15
17
  テナントに登録するサイト origin は Vue の origin です。Go SDK の Origin と資格情報 JSON の API origin は AuthLink API を指します。ブラウザーの baseUrl は Go の業務 API です。TenantID/APIKey はバックエンドの非公開設定にのみ保存します。
16
18
 
@@ -10,7 +10,9 @@
10
10
  | --- | --- | --- |
11
11
  | Vue | `https://cms.example.com` | `apiOrigin` 指向下方的 Go 后台 |
12
12
  | Go CMS API | `https://cms-api.example.com` | `baseUrl=https://cms-api.example.com/api/authlink` |
13
- | AuthLink API | `https://auth.example.com` | Go SDK 的 `Origin`;浏览器的 `authLinkOrigin` |
13
+ | AuthLink API | `https://api.getauthlink.com` | Go SDK 的 `Origin`;浏览器的 `authLinkOrigin` |
14
+
15
+ AuthLink API 使用生产地址 `https://api.getauthlink.com`;Vue 网站和 Go CMS 的域名仍是接入方自己的示例,不能替换成 AuthLink 官网域名。
14
16
 
15
17
  登记租户的站点 origin 是 Vue 网站来源;Go SDK 的 `Origin` 和凭据导出 JSON 中的 API origin 是 AuthLink API 来源。浏览器的 `baseUrl` 指向 Go 业务后台,不能指向 AuthLink 租户 API。公开运行配置只包含这三个 origin;`TenantID`、`APIKey` 保留在 Go 私密配置或环境变量中。
16
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auth-link/web",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "description": "Three responsive AuthLink dialog layouts for phone binding and mobile confirmation. Framework-neutral API, React and Vue, 13 languages, Simplified Chinese by default.",
6
6
  "type": "module",