Closed bensos000 closed 7 months ago
I'll look into it Sunday morning
This seems to be a cookie issue with bun
and cookie-session
. Did you try NodeJS?
Hi @bensos000, we've looked deeper into this, and it seems that the issue here is a problem with the node js package called cookie-session that doesn't work correctly - and starts a new session on each request.
So, once you sign in, and set the user in the session, that user is not in the session in the next request. You can replace the cookie session usage with any other cookie session implementation that is popular in ban and it'll probably work
@noam-honig thanks i will try it and confirm it if it works
i confirm it works with hono and hono-sessions middleware https://github.com/bensos000/remultmonorepo
when i try to make some crud operations from the frontend it returns this
i think the payload returned from repo in the controller is not right
but it works when listing all todos in liveQuery
Can you share the code?
the code is in the same repo i have commited hono remult server with the new changes in the main branch => https://github.com/bensos000/remultmonorepo
It seems that you have two versions of remult - one exp in the backend and one 25.5 in the shared. - causing to instances of remult to run in memory.
Can you please align both package.json
i have updated the version of remult to exp in shared package and the same problem persist.
You probably still have duplicate remult
packages (two node_modules/remult
folders) installed somewhere in your project tree.
While we'd like to fix remult to handle these situations better, having only one instance of the package in your tree is better.
Try deleting all remult
folders and re-running bun install
.
yes you're right i have shared now only one instance of remult throught the backend package and i confirm it works now
Can you check this out in the latest version, I think it's fixed by now
i have made 2 remult instances in the monorepo like this : and i confirm it works now:
Perfect.
One more thing, if you want to contribute an example project that shows bun, hono and hono-sessions - it would be a great contribution.
Simply add it to: https://github.com/remult/remult/tree/master/examples
ok i will make a pull request with an example of bun-hono-monorepo-todo
here is the pr : https://github.com/remult/remult/pull/375
Thanks - I've merged it
when i want to have livequery fetch data in authenticated method it return 403. here is the code in github: https://github.com/bensos000/remultmonorepo run it and when it authenticate it will return 403 for tasks list. can you correct the code ?