@sylphx/auth-solid 0.1.2 → 0.1.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/README.md +27 -3
- package/dist/browser.js +797 -335
- package/dist/index.d.ts +2 -1
- package/dist/locale.d.ts +1 -1
- package/dist/messages-iberian.d.ts +154 -0
- package/dist/messages.d.ts +223 -0
- package/dist/passkey-enroll.d.ts +11 -0
- package/dist/server.js +523 -124
- package/dist/sign-in-controller.d.ts +13 -22
- package/dist/sign-in-messages.d.ts +3 -0
- package/dist/sign-in-request.d.ts +24 -0
- package/dist/sign-in-webauthn.d.ts +2 -0
- package/dist/sign-in.css +9 -0
- package/dist/sign-in.d.ts +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@ A Solid package with compiled browser and SSR entry points. Install both SDKs
|
|
|
4
4
|
and Solid in your application, then mount the same-origin `@sylphx/auth` routes
|
|
5
5
|
on your application server. It owns the surrounding page, return-path allowlist,
|
|
6
6
|
and legal links; this package does not import a router or an application shell.
|
|
7
|
+
On Sylphx Hosting, configure `trustSylphxEdge: true` on the **server handler**
|
|
8
|
+
only for managed literal-host ingress that overwrites the Edge headers; see the
|
|
9
|
+
[`@sylphx/auth` Hosting setup](../auth/README.md#sylphx-hosting).
|
|
7
10
|
|
|
8
11
|
```tsx
|
|
9
12
|
import { SylphxSignIn } from '@sylphx/auth-solid'
|
|
@@ -39,7 +42,7 @@ associations and manage focus in the custom view. Unmount aborts pending work.
|
|
|
39
42
|
### Language
|
|
40
43
|
|
|
41
44
|
The component ships English, Traditional Chinese for Hong Kong and Taiwan,
|
|
42
|
-
Simplified Chinese, and
|
|
45
|
+
Simplified Chinese, Japanese, Korean, Spanish (`es`), and Brazilian Portuguese (`pt-BR`). It renders a language selector below the
|
|
43
46
|
form and preserves values and progress when the language changes. Set
|
|
44
47
|
`showLocaleSelector={false}` if the host already provides a selector.
|
|
45
48
|
|
|
@@ -50,7 +53,10 @@ those hints, SSR starts in English and the browser's language preferences are
|
|
|
50
53
|
used after mount. Unsupported or malformed tags fall through to the next hint,
|
|
51
54
|
then English. `resolveAuthLocale` exposes the same negotiation for hosts.
|
|
52
55
|
Supply custom headings, descriptions and legal copy in the active language.
|
|
53
|
-
|
|
56
|
+
Use `messages` for partial catalog overrides (including individual error strings).
|
|
57
|
+
Supply an explicit BCP 47 `locale` with your catalog for additional languages;
|
|
58
|
+
missing strings fall back to the nearest bundled catalog or English. The
|
|
59
|
+
widget does not change the language of email sent by the Auth service.
|
|
54
60
|
|
|
55
61
|
Headless clients can render `signInMessages[locale].errors[errorCode]` when
|
|
56
62
|
`controller.errorCode()` is nonempty. The existing `controller.error()` still
|
|
@@ -67,10 +73,28 @@ mount it anywhere other than `/auth`.
|
|
|
67
73
|
|
|
68
74
|
Render your consent UI using `agreement` or your own layout. Use
|
|
69
75
|
`getAcceptance={() => agreed() ? { terms: termsVersion, privacy: privacyVersion } : undefined}`
|
|
70
|
-
so requests send only the versions the user actually accepted.
|
|
76
|
+
so requests send only the versions the user actually accepted. Set
|
|
77
|
+
`requireAgreement` and provide a reactive `agreementAccepted` boolean to disable
|
|
78
|
+
and block authentication actions until the checkbox is checked. Configure
|
|
71
79
|
server-side `clickwrap` to enforce those versions; the UI alone is not a gate.
|
|
72
80
|
|
|
73
81
|
Set `conditionalPasskey` to opt into discoverable credential autofill on the
|
|
74
82
|
first sign-in screen. The identifier input uses `username webauthn` when
|
|
75
83
|
passkeys are configured. Unsupported or canceled conditional requests fall
|
|
76
84
|
back to the existing explicit passkey and other enabled sign-in controls.
|
|
85
|
+
|
|
86
|
+
When both email OTP and password are configured, the password option is
|
|
87
|
+
available without starting OTP. If `recovery` is enabled in server config, the
|
|
88
|
+
password screen offers the host's recovery flow. The confirmation screen hides
|
|
89
|
+
mail proof from the URL and allows an independent passkey sign-in when enabled;
|
|
90
|
+
a passkey is not submitted as email proof or as a substitute for MFA.
|
|
91
|
+
|
|
92
|
+
Use `lastUsed="google"` (or another provider, `password`, `otp`, or `passkey`)
|
|
93
|
+
to label the method from a host-controlled, non-authoritative hint. Use
|
|
94
|
+
`beforeOAuthNavigate` for an optional app hook after validating the provider
|
|
95
|
+
destination and before navigation. Do not put secrets in client hints.
|
|
96
|
+
|
|
97
|
+
Render `<SylphxPasskeyEnroll enabled={config.passkeyEnrollment === true} />`
|
|
98
|
+
in a signed-in view. It supports the same `routePrefix`, `locale` and `messages`
|
|
99
|
+
options. The handler and Identity, not the visibility of this component,
|
|
100
|
+
authorize enrollment and enforce recent authentication.
|