KHRM
Explore posts from serversKKinde
•Created by conkyyy on 10/3/2024 in #💻┃support
How to add subdomain auth flow for a multi tenant app?
6 replies
KKinde
•Created by conkyyy on 10/3/2024 in #💻┃support
How to add subdomain auth flow for a multi tenant app?
currently not using kinde middleware since i just set it up (also not sure if that is a facto)
6 replies
KKinde
•Created by conkyyy on 10/3/2024 in #💻┃support
How to add subdomain auth flow for a multi tenant app?
hoping I can hop on this old thread because im trying to do something similar
here is my .env
I want the user to be able to login from http://localhost:3000 or http://*.localhost:3000 (i.e. http://testing.localhost:3000, http://potato.localhost:3000)
and have the same user
I log in from http://localhost:3000 and i see my user
but when i go to http://testing.localhost:3000 the user is null (also there are no cookies so that makes sense)
not sure how to use the wildcard strategy here im usingNext.js v15 app router
currently I am using nextjs rewrites to access my subdomain not sure if that is related to the issue
6 replies
PPrisma
•Created by kimb0x on 11/5/2024 in #help-and-questions
Can't delete records from Prisma Postgres in Studio
I had this issue too, one of my tables didn't have an @id only an @unique and it seems to work after I made the schema change and made it an @id
Not sure if that's the actual issue
27 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
I read some where recently you can write mysql functions in JavaScript now so thats pretty cool
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
true sometimes wonder if that would be more ideal than doing it at the server level
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
couldnt figure out a good solution so I opted for having an
earliestDate
flag
I just have to now make sure that whenever an eventDate
is delete I keep it in sync
i.e. make sure earliestDate is updated for the event if needed38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
I do have access to postgres but here I am trying to expand xD wanted to try out Turso
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
I tried the typed SQL was pretty damn cool I might made a video on it
But with sqlite it's gonna be hard to aggregate eegate the dates without turning them into strings
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
Yeah it doesn't allow it
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
newer models
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
I just reduced it from 3 tables to two tables xD but prisma still doesn't let you sort by relations just count for some reason
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
yeah I might refactor to something like that, will look more into that jsonb thing as well
It'll also make the queries overall simpler
Thanks for the tips felt nice to talk about code with someone been a lonely journey haha
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
Well give or take the years, events would usually be within a year or so in practice and then they'd be deleted as needed
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
But I don't know if that has any real benefit
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
there's only 365 dates in a year so this way only 365 rows would be the max for the dates table
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
it's more like I want to practice
the real purpose of all 3 tables was to reuse dates
but honestly I don't think it's worth it
Should just have 2 or even 1 table for this type of thing and just aggregate on the dates
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
thanks I'll check it out for learning purposes
But it might be easier in my case to add a field to my events table called earliestDate
38 replies
PPrisma
•Created by KHRM on 10/3/2024 in #help-and-questions
Sorting by Relations
view sounds interesting I think I'd like to explore any pointers on how to get started on that
38 replies