@sylphx/auth-solid 0.1.2 → 0.1.3

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 CHANGED
@@ -39,7 +39,7 @@ associations and manage focus in the custom view. Unmount aborts pending work.
39
39
  ### Language
40
40
 
41
41
  The component ships English, Traditional Chinese for Hong Kong and Taiwan,
42
- Simplified Chinese, and Japanese. It renders a language selector below the
42
+ Simplified Chinese, Japanese, Korean, Spanish (`es`), and Brazilian Portuguese (`pt-BR`). It renders a language selector below the
43
43
  form and preserves values and progress when the language changes. Set
44
44
  `showLocaleSelector={false}` if the host already provides a selector.
45
45
 
@@ -50,7 +50,10 @@ those hints, SSR starts in English and the browser's language preferences are
50
50
  used after mount. Unsupported or malformed tags fall through to the next hint,
51
51
  then English. `resolveAuthLocale` exposes the same negotiation for hosts.
52
52
  Supply custom headings, descriptions and legal copy in the active language.
53
- The widget does not change the language of email sent by the Auth service.
53
+ Use `messages` for partial catalog overrides (including individual error strings).
54
+ Supply an explicit BCP 47 `locale` with your catalog for additional languages;
55
+ missing strings fall back to the nearest bundled catalog or English. The
56
+ widget does not change the language of email sent by the Auth service.
54
57
 
55
58
  Headless clients can render `signInMessages[locale].errors[errorCode]` when
56
59
  `controller.errorCode()` is nonempty. The existing `controller.error()` still
@@ -67,10 +70,28 @@ mount it anywhere other than `/auth`.
67
70
 
68
71
  Render your consent UI using `agreement` or your own layout. Use
69
72
  `getAcceptance={() => agreed() ? { terms: termsVersion, privacy: privacyVersion } : undefined}`
70
- so requests send only the versions the user actually accepted. Configure
73
+ so requests send only the versions the user actually accepted. Set
74
+ `requireAgreement` and provide a reactive `agreementAccepted` boolean to disable
75
+ and block authentication actions until the checkbox is checked. Configure
71
76
  server-side `clickwrap` to enforce those versions; the UI alone is not a gate.
72
77
 
73
78
  Set `conditionalPasskey` to opt into discoverable credential autofill on the
74
79
  first sign-in screen. The identifier input uses `username webauthn` when
75
80
  passkeys are configured. Unsupported or canceled conditional requests fall
76
81
  back to the existing explicit passkey and other enabled sign-in controls.
82
+
83
+ When both email OTP and password are configured, the password option is
84
+ available without starting OTP. If `recovery` is enabled in server config, the
85
+ password screen offers the host's recovery flow. The confirmation screen hides
86
+ mail proof from the URL and allows an independent passkey sign-in when enabled;
87
+ a passkey is not submitted as email proof or as a substitute for MFA.
88
+
89
+ Use `lastUsed="google"` (or another provider, `password`, `otp`, or `passkey`)
90
+ to label the method from a host-controlled, non-authoritative hint. Use
91
+ `beforeOAuthNavigate` for an optional app hook after validating the provider
92
+ destination and before navigation. Do not put secrets in client hints.
93
+
94
+ Render `<SylphxPasskeyEnroll enabled={config.passkeyEnrollment === true} />`
95
+ in a signed-in view. It supports the same `routePrefix`, `locale` and `messages`
96
+ options. The handler and Identity, not the visibility of this component,
97
+ authorize enrollment and enforce recent authentication.