@lalternative/auth 0.13.3 → 0.15.0
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 +115 -0
- package/dist/client.d.ts +1 -1
- package/dist/index.d.ts +21 -4
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +96 -5
- package/dist/server.js +364 -3
- package/dist/server.js.map +1 -1
- package/dist/{sso-profile-HO-u17jd.d.ts → sso-profile-aNyHaZHJ.d.ts} +1 -1
- package/dist/{types-3OHf736K.d.ts → types-COX3VaBw.d.ts} +39 -1
- package/package.json +1 -1
|
@@ -141,6 +141,29 @@ interface PlatformSsoConfig {
|
|
|
141
141
|
/** Lets a first visit create the local user. Defaults to true. */
|
|
142
142
|
allowSignUp?: boolean;
|
|
143
143
|
}
|
|
144
|
+
interface PlatformKratosPasswordConfig {
|
|
145
|
+
/** Kratos' public URL, e.g. https://id.urbangate.dev */
|
|
146
|
+
publicUrl: string;
|
|
147
|
+
/** urbangate's issuer URL for the provisioning credential. */
|
|
148
|
+
issuer: string;
|
|
149
|
+
/** The product's provisioner client, e.g. "spore-provisioner". */
|
|
150
|
+
clientId: string;
|
|
151
|
+
clientSecret: string;
|
|
152
|
+
/** The role granted to a customer of this product, e.g. "spore:user". */
|
|
153
|
+
role: string;
|
|
154
|
+
/** The product id, e.g. "spore". */
|
|
155
|
+
product: string;
|
|
156
|
+
/**
|
|
157
|
+
* Called when a sign-up could not reach the provider, so the app can queue
|
|
158
|
+
* the repair. The sign-up itself always succeeds: the hook runs after the
|
|
159
|
+
* insert commits, and a customer is never refused registration because the
|
|
160
|
+
* provider is down.
|
|
161
|
+
*/
|
|
162
|
+
onProvisioningDeferred?: (input: {
|
|
163
|
+
userId: string;
|
|
164
|
+
email: string;
|
|
165
|
+
}) => void | Promise<void>;
|
|
166
|
+
}
|
|
144
167
|
interface SsoClientSurface {
|
|
145
168
|
signIn: {
|
|
146
169
|
social(args: {
|
|
@@ -182,6 +205,21 @@ interface PlatformAuthConfig {
|
|
|
182
205
|
* as admin, anyone else as a plain user. Omit to leave it off.
|
|
183
206
|
*/
|
|
184
207
|
sso?: PlatformSsoConfig;
|
|
208
|
+
/**
|
|
209
|
+
* Moves the customers' passwords to the suite's identity provider while the
|
|
210
|
+
* app keeps its own login screen, its own domain and its own session. The
|
|
211
|
+
* form posts to this app as before; the password is checked against Kratos
|
|
212
|
+
* instead of a local hash, and the person is never redirected.
|
|
213
|
+
*
|
|
214
|
+
* Each app keeps its own accounts: the same person signing up on two
|
|
215
|
+
* products has two local users and two passwords. They share one identity
|
|
216
|
+
* at the provider, which is what an app key is issued against — so an app
|
|
217
|
+
* dropping a local account must drop its role, never deactivate the
|
|
218
|
+
* identity, or the person loses every other product of the suite.
|
|
219
|
+
*
|
|
220
|
+
* Omit to leave passwords local, as before.
|
|
221
|
+
*/
|
|
222
|
+
kratosPasswords?: PlatformKratosPasswordConfig;
|
|
185
223
|
/**
|
|
186
224
|
* Override the OTP email subject line per verification type. Merged over
|
|
187
225
|
* the platform defaults — provide only the keys you want to change. The
|
|
@@ -729,4 +767,4 @@ interface AuthLayoutProps extends AuthHeadingProps {
|
|
|
729
767
|
footer?: React.ReactNode;
|
|
730
768
|
}
|
|
731
769
|
|
|
732
|
-
export type { AuthLayoutProps as A, ForgotPasswordFormProps as F, InvitationNoticeProps as I, LoginFormProps as L, MagicLinkFormProps as M, PlatformAuthClientConfig as P, RegisterFormProps as R, SsoClientSurface as S, TwoFactorClientSurface as T, VerifyEmailFormProps as V, ResetPasswordFormProps as a, AuthClientResult as b, LinkComponent as c, AdminClientSurface as d, AuthClientDataResult as e, AuthClientSurface as f, AuthInviteProps as g, AuthNavProps as h, AuthThemeProps as i, InvitationFailure as j, LoginFormLabels as k, MagicLinkClientSurface as l, MagicLinkConfig as m, MagicLinkFormLabels as n, PlatformAuthConfig as o, PlatformAuthMailer as p, PlatformAuthMailerArgs as q, PlatformAuthMailerType as r,
|
|
770
|
+
export type { AuthLayoutProps as A, RegisterFormLabels as B, ForgotPasswordFormProps as F, InvitationNoticeProps as I, LoginFormProps as L, MagicLinkFormProps as M, PlatformAuthClientConfig as P, RegisterFormProps as R, SsoClientSurface as S, TwoFactorClientSurface as T, VerifyEmailFormProps as V, ResetPasswordFormProps as a, AuthClientResult as b, LinkComponent as c, AdminClientSurface as d, AuthClientDataResult as e, AuthClientSurface as f, AuthInviteProps as g, AuthNavProps as h, AuthThemeProps as i, InvitationFailure as j, LoginFormLabels as k, MagicLinkClientSurface as l, MagicLinkConfig as m, MagicLinkFormLabels as n, PlatformAuthConfig as o, PlatformAuthMailer as p, PlatformAuthMailerArgs as q, PlatformAuthMailerType as r, PlatformKratosPasswordConfig as s, PlatformRateLimitConfig as t, PlatformRateLimitRule as u, PlatformSession as v, PlatformSessionData as w, PlatformSsoConfig as x, PlatformTwoFactorConfig as y, PlatformUser as z };
|