@rebasepro/types 0.33.2 → 0.34.1
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/dist/index.es.js.map +1 -1
- package/dist/types/auth_adapter.d.ts +24 -1
- package/package.json +1 -1
|
@@ -304,6 +304,18 @@ export interface AuthAdapterCapabilities {
|
|
|
304
304
|
* Only applicable for built-in auth.
|
|
305
305
|
*/
|
|
306
306
|
needsSetup?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Sign-in methods the backend was told to enable and cannot offer, with
|
|
309
|
+
* why. `magicLink: "EMAIL_NOT_CONFIGURED"` is `AUTH_MAGIC_LINK=true` on a
|
|
310
|
+
* backend with no email service: `magicLink` above is `false` and the
|
|
311
|
+
* route answers 503, which for an app whose only sign-in is the magic
|
|
312
|
+
* link means nobody can sign in. Absent when nothing is missing, and on
|
|
313
|
+
* a backend that predates the field.
|
|
314
|
+
*/
|
|
315
|
+
unavailable?: {
|
|
316
|
+
magicLink?: "EMAIL_NOT_CONFIGURED";
|
|
317
|
+
emailOtp?: "EMAIL_NOT_CONFIGURED";
|
|
318
|
+
};
|
|
307
319
|
}
|
|
308
320
|
/**
|
|
309
321
|
* What `GET /api/auth/config` answers: the auth adapter's capabilities, plus
|
|
@@ -324,6 +336,17 @@ export interface AuthConfigDocument extends AuthAdapterCapabilities {
|
|
|
324
336
|
* `GET /storage/sources` there.
|
|
325
337
|
*/
|
|
326
338
|
storage?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Present when the platform hosting this backend can sign its project's
|
|
341
|
+
* owners in (Rebase Cloud sets it at deploy). The admin panel then offers
|
|
342
|
+
* "Continue with Rebase Cloud" instead of leaving an owner at a login form
|
|
343
|
+
* they hold no credentials for. `url` is where that button goes: the
|
|
344
|
+
* project's page in the platform's console, which signs the owner in and
|
|
345
|
+
* comes back. Absent on a self-hosted backend.
|
|
346
|
+
*/
|
|
347
|
+
platformSignIn?: {
|
|
348
|
+
url?: string;
|
|
349
|
+
};
|
|
327
350
|
}
|
|
328
351
|
/**
|
|
329
352
|
* Options for paginated user listing.
|
|
@@ -518,7 +541,7 @@ export interface TransformAuthResponseContext {
|
|
|
518
541
|
/** The authenticated user's ID. */
|
|
519
542
|
uid: string;
|
|
520
543
|
/** The auth method that triggered this response. */
|
|
521
|
-
method: "login" | "register" | "oauth" | "refresh" | "anonymous" | "magic-link" | "otp" | "mfa" | "device";
|
|
544
|
+
method: "login" | "register" | "oauth" | "refresh" | "anonymous" | "magic-link" | "otp" | "mfa" | "device" | "platform";
|
|
522
545
|
/** The raw HTTP request (for reading headers, IP, etc.). */
|
|
523
546
|
request: Request;
|
|
524
547
|
}
|