@rebasepro/server 0.29.3 → 0.30.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.
|
@@ -293,19 +293,23 @@ export interface RebaseAuthConfig {
|
|
|
293
293
|
*/
|
|
294
294
|
emailOtp?: boolean;
|
|
295
295
|
/**
|
|
296
|
-
*
|
|
296
|
+
* Where the refresh token is handed to a browser. On by default, as the
|
|
297
|
+
* runtime has it.
|
|
297
298
|
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
299
|
+
* The refresh token is delivered as an `httpOnly`, `Secure`, `SameSite=Lax`
|
|
300
|
+
* cookie instead of in the JSON response body, out of reach of XSS. The
|
|
301
|
+
* access token remains in the body for `Authorization: Bearer` headers. A
|
|
302
|
+
* browser `@rebasepro/client` defaults to this flow; a client without a
|
|
303
|
+
* cookie jar sends `x-rebase-auth-flow: json` and is answered in the body.
|
|
301
304
|
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
305
|
+
* Pass an object to change the cookie's name, path, domain, `SameSite` or
|
|
306
|
+
* `Secure`. Pass `false` to answer every client in the body, as a server
|
|
307
|
+
* without cookies does; a browser client then needs `authFlowMode: "json"`.
|
|
304
308
|
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
309
|
+
* A browser app on another origin needs CORS that allows credentials (no
|
|
310
|
+
* `origin: "*"`).
|
|
307
311
|
*/
|
|
308
|
-
cookieAuth?: import("../auth/index.js").CookieAuthConfig;
|
|
312
|
+
cookieAuth?: import("../auth/index.js").CookieAuthConfig | false;
|
|
309
313
|
/**
|
|
310
314
|
* Refuse password sign-in until the account's email address is verified,
|
|
311
315
|
* and make registration confirm-first. Off by default.
|