Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure to pass sensitive session data to page? #59

Open
johnnypea opened this issue Aug 16, 2023 · 1 comment
Open

Secure to pass sensitive session data to page? #59

johnnypea opened this issue Aug 16, 2023 · 1 comment

Comments

@johnnypea
Copy link

Please, is it safe/secure to pass sensitive session data to page like this?

/** @type {import('@sveltejs/kit').LayoutServerLoad} */
export function load({ locals, request }) {
	return {
		session: locals.session.data
	};
}

Or what is the recommended approach to use a "token" from session in client side requests (fetch) to external API?

Thank you.

@Neptunium1129
Copy link

Neptunium1129 commented Oct 23, 2024

In Sveltekt hooks.server.js , the HttpOnly cookie is not being sent. I think encrypting the cookie might be the only solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants