server side context?
I am trying to implement pocketbase auth and currently I do:
the problem is pocketbase instace is created once during server startup, but I want to create a new instance for each request but I'm struggling to figure out how to do that in start.
5 Replies
sunny-green•3mo ago
Create a middleware that instantiate the instance. (i hope i do get your point, feel free to counter if you feel like i don't)
sensitive-blueOP•3mo ago
odd, i swear I tried it and got serialization error, but this works! but now I'm having another issue, my server functions throw redirect doesnt work anymore
sunny-green•3mo ago
GitHub
Can't redirect in server functions with middleware · Issue #4460 ...
Which project does this relate to? Start Describe the bug Throwing redirects in server functions that use middleware doesn't work. It works fine if I remove the middleware. I am using the useSe...
other-emerald•3mo ago
we are currently reworking all of this so this will be fixed soon
sensitive-blueOP•3mo ago
thanks for the hard work