@replicated/portal-components 0.0.28 → 0.0.29
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/components/metadata/registry.json +2 -2
- package/components/metadata/registry.md +2 -2
- package/dist/actions/magic-link-actions.d.mts +1 -1
- package/dist/actions/magic-link-actions.d.ts +1 -1
- package/dist/actions/magic-link-actions.js +2 -2
- package/dist/actions/magic-link-actions.js.map +1 -1
- package/dist/esm/actions/magic-link-actions.js +2 -2
- package/dist/esm/actions/magic-link-actions.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/use-verify-magic-link.js +4 -3
- package/dist/esm/use-verify-magic-link.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/use-verify-magic-link.d.mts +3 -2
- package/dist/use-verify-magic-link.d.ts +3 -2
- package/dist/use-verify-magic-link.js +4 -3
- package/dist/use-verify-magic-link.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,6 @@ interface VerifyMagicLinkActionResult {
|
|
|
3
3
|
message?: string;
|
|
4
4
|
isExpired?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const verifyMagicLinkWithCookie: (code: string) => Promise<VerifyMagicLinkActionResult>;
|
|
6
|
+
declare const verifyMagicLinkWithCookie: (code: string, isPreview?: boolean | undefined) => Promise<VerifyMagicLinkActionResult>;
|
|
7
7
|
|
|
8
8
|
export { type VerifyMagicLinkActionResult, verifyMagicLinkWithCookie };
|
|
@@ -3,6 +3,6 @@ interface VerifyMagicLinkActionResult {
|
|
|
3
3
|
message?: string;
|
|
4
4
|
isExpired?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const verifyMagicLinkWithCookie: (code: string) => Promise<VerifyMagicLinkActionResult>;
|
|
6
|
+
declare const verifyMagicLinkWithCookie: (code: string, isPreview?: boolean | undefined) => Promise<VerifyMagicLinkActionResult>;
|
|
7
7
|
|
|
8
8
|
export { type VerifyMagicLinkActionResult, verifyMagicLinkWithCookie };
|
|
@@ -439,12 +439,12 @@ var isHttpApiOrigin = () => {
|
|
|
439
439
|
};
|
|
440
440
|
|
|
441
441
|
// src/actions/magic-link-actions.ts
|
|
442
|
-
async function verifyMagicLinkWithCookieImpl(code) {
|
|
442
|
+
async function verifyMagicLinkWithCookieImpl(code, isPreview) {
|
|
443
443
|
try {
|
|
444
444
|
const result = await verifyMagicLink.run({ nonce: code });
|
|
445
445
|
const cookieStore = await headers.cookies();
|
|
446
446
|
const secure = true;
|
|
447
|
-
const sameSiteValue = isHttpApiOrigin() ? "none" : "lax";
|
|
447
|
+
const sameSiteValue = isHttpApiOrigin() || isPreview ? "none" : "lax";
|
|
448
448
|
cookieStore.set("portal_session", result.token, {
|
|
449
449
|
httpOnly: true,
|
|
450
450
|
secure,
|