-
Notifications
You must be signed in to change notification settings - Fork 5
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
Flash message conflicts with hooks.server.js #5
Comments
Hi, on the top of my head, it looks like the flash cookie goes missing in the cookie manipulation that is done in Can you use |
You can use |
I followed your suggestions and found out that the problem was caused by this line of code that overwrites the cookie used by your library:
The solution that i found was to change set with append, like this:
This way both the authentication and the flash cookies are passed to the page and everything works as intended. Thank you very much for your support and the creation of this library! |
Issue closed |
Glad that it was an easy fix, and thanks for using the library! :) |
I am building a webapp using pocketbase as a login database but i am having problems passing the flash message after an authentication request. After some tests the problem looks related to the hooks.server.js file: if i remove it the message is displayed correctly otherwise the flash message does not appear. These are my current files:
hooks.server.js
+layout.server.js
/auth/+page.server.js (the authentication endpoint)
+layout.svelte
What can i do to have both the hooks file (required for the authentication process) and show a flash message afterwards?
The text was updated successfully, but these errors were encountered: