Replies: 1 comment
-
I'm confused and not sure that I understand the question or the described problem. The Astro example in the JS SDK readme is for server-side rendering and there is no A lot of users seems to use JS meta frameworks without actually understanding what and where their code runs and honestly I'm getting tired and don't want to deal with this JS related questions anymore. PocketBase is not just a database, it is a backend. The easiest and recommended way to use it is by interacting directly with your PocketBase server from the client-side (eg. with a SPA). |
Beta Was this translation helpful? Give feedback.
-
The middleware provided in the JS-sdk, doesn’t have access to the logged-in user, my guess is I have to set a cookie in the login process — correct? I guess I have to use Document.cookie API, or create my own custom adapter to use solutions like lucia?
It's a bummer because I can't take advantage of Astro's cookies API - the alternative is to use PB's default method of storing the token in the localStorage, and then, validating the user in client-side components/pages, right? Just wondering what'd be the best approach. If so, then the middleware doesn't help much, right?
Beta Was this translation helpful? Give feedback.
All reactions