GithubHelp home page GithubHelp logo

Comments (8)

ciscoheat avatar ciscoheat commented on May 30, 2024

Could be, I'm not sure. The sameSite option could be related.

from sveltekit-flash-message.

benquan avatar benquan commented on May 30, 2024

Used you example in #19 and it worked!

The code if anyone has a similar issue:

import { loadFlash, flashCookieOptions } from 'sveltekit-flash-message/server';

flashCookieOptions.sameSite = 'none';
flashCookieOptions.secure = true;

export const load = loadFlash(async ({ locals }) => {
	const ans = await locals.auth.validate();
	if (ans) return { user: ans.user };
});

from sveltekit-flash-message.

ciscoheat avatar ciscoheat commented on May 30, 2024

Great that it worked! Could you just check one thing: SvelteKit sets secure to true as default, can you remove that option and see if it still is secure? In that case, I'll update the docs.

from sveltekit-flash-message.

ciscoheat avatar ciscoheat commented on May 30, 2024

Or rather, it shouldn't be secure on localhost with http, but secure otherwise.

from sveltekit-flash-message.

benquan avatar benquan commented on May 30, 2024

where would I set the option in Sveltekit?

from sveltekit-flash-message.

ciscoheat avatar ciscoheat commented on May 30, 2024

It's the default setting, so you just have to remove it, and see if it works both in dev and when built + https.

from sveltekit-flash-message.

benquan avatar benquan commented on May 30, 2024

Ohh gotcha. But no, it does not work if I remove the line. Just checked in dev.

from sveltekit-flash-message.

ciscoheat avatar ciscoheat commented on May 30, 2024

Ok, probably because the Google url is https!

from sveltekit-flash-message.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.