koshchei
koshchei
Explore posts from servers
TTCTheo's Typesafe Cult
Created by koshchei on 12/23/2023 in #questions
Head component in Astro
I need to add some custom styles into <head> tag from component. But there is no <Head> component in Astro that would be similar to Next's or SvelteKit's. Is there any way to make it possible without property drilling everywhere. Some global variable or whatever
<style set:html={css}></style>
<style set:html={css}></style>
2 replies
DTDrizzle Team
Created by koshchei on 8/29/2023 in #help
Select EXISTS
How to query boolean value if row exists or not. In pure sql it will be like this:
SELECT EXISTS(SELECT 1 FROM your_table_name WHERE id = 1 AND version = 5)
SELECT EXISTS(SELECT 1 FROM your_table_name WHERE id = 1 AND version = 5)
6 replies
DTDrizzle Team
Created by koshchei on 8/29/2023 in #help
Buffer isn't defined
I use blob mode:json for my fields and run it on Cloudflare Workers. But I get that Buffers isn't defined. As I understand blob only compatible with Node.
1 replies
DTDrizzle Team
Created by koshchei on 8/28/2023 in #help
hashing password in Cloudflare Workers
Can someone help me find function to hash password and verify it that works in Cloudflare Workers
2 replies
TTCTheo's Typesafe Cult
Created by koshchei on 8/28/2023 in #questions
Password hashing
Can someone help me find function to hash password and verify it that works in Cloudflare Workers
5 replies
TTCTheo's Typesafe Cult
Created by koshchei on 8/18/2023 in #questions
Is there universal function with will convert string to base64?
It should work in browser and node.
2 replies
TTCTheo's Typesafe Cult
Created by koshchei on 7/22/2023 in #questions
How to store image path in database?
I use S3 compatible service: Storj for storing my images. So when you upload file you get bucket name and key. Do you store bucket and key in database? Or you just store url and extract bucket and key from in during deletion? Are you create several tables of images or create 1 image table and make many to many with other tables? Also if I possibly will have 2 image storage providers I need to store provider id.
1 replies
TTCTheo's Typesafe Cult
Created by koshchei on 3/21/2023 in #questions
Is it possible to create API keys with NextAuth?
I need something like API keys
1 replies
TTCTheo's Typesafe Cult
Created by koshchei on 3/16/2023 in #questions
How to create API token with Clerk?
I need support of API tokens for my service which never expires. Theo recommended Clerk as auth options. Does it supports my request?
2 replies
TTCTheo's Typesafe Cult
Created by koshchei on 3/15/2023 in #questions
How to create never expire refresh token?
I want to add tokens for developers to access my API. How can I do it with NextAuth, can it create refresh token that never expire?
3 replies
TTCTheo's Typesafe Cult
Created by koshchei on 3/13/2023 in #questions
Why not to use only 1 token in JWT?
So we can create only 1 token which we will store in cookie. Let's call it bi token. So bi token will act like refresh token + have checkTime field which will act like expiration of access token. A client don't worry about storing access token. At the same time it's secure, because token version will be checked on the server each checkTime + regenerated without additional request. Maybe I miss something, that's why I ask.
2 replies
TTCTheo's Typesafe Cult
Created by koshchei on 2/2/2023 in #questions
Nested routers
What amount of nested routers is recommended to use. Do we need more than 1 layer aka AppRouter and 1 layer of subrouters (like Controllers)?
1 replies