Firstly, thank you for this awesome library! I was able to get auth working in minutes and I pretty much have no idea what I'm doing.
With that, I'm not a dev, more of a hobbyist (this is the first issue I've ever written) so I'm probably way off and missing something that may be simple so feel free to tell me to kick rocks and go learn more about everything 😅.
Basically, a user will enter credentials (api_key and api_secret) into a form where I will save them using Vercel KV and in order to do that, I need their Clerk user.id. Right now I'm doing this in a super janky way by passing a hidden form field to my +page.server.ts like so:
It works and I'm using this in a few places, but I would like things to be more DRY and centralize my API calls. I noticed in the CLerk docs helpers like auth() and currentUser() which I assume are 'server' things since they're used in Nexts' app router. Is there something similar for this library? Do I need to look more into the ClerkJS library for answers?
Again, thanks for making this, and if this all makes no sense, feel free to close without comment!! 🙌🏽
UPDATE: I'm an idiot and just realized that I can get it from locals. Sorry for the bother! 🤦🏾
Hello friend!
Firstly, thank you for this awesome library! I was able to get auth working in minutes and I pretty much have no idea what I'm doing.
With that, I'm not a dev, more of a hobbyist (this is the first issue I've ever written) so I'm probably way off and missing something that may be simple so feel free to tell me to kick rocks and go learn more about everything 😅.
Basically, a user will enter credentials (api_key and api_secret) into a form where I will save them using Vercel KV and in order to do that, I need their Clerk
user.id
. Right now I'm doing this in a super janky way by passing a hidden form field to my+page.server.ts
like so:It works and I'm using this in a few places, but I would like things to be more DRY and centralize my API calls. I noticed in the CLerk docs helpers like
auth()
andcurrentUser()
which I assume are 'server' things since they're used in Nexts' app router. Is there something similar for this library? Do I need to look more into the ClerkJS library for answers?Again, thanks for making this, and if this all makes no sense, feel free to close without comment!! 🙌🏽
UPDATE: I'm an idiot and just realized that I can get it from
locals
. Sorry for the bother! 🤦🏾