Shoodey
Shoodey
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Sofiane on 8/28/2023 in #questions
How to access Next Auth session or jwt from axios interceptor
I know i dont answer the question, but why are you using axios? - do your external api calls using fetch() from trpc (server side) where you have all your session info
2 replies
TTCTheo's Typesafe Cult
Created by Jazon on 9/13/2023 in #questions
Next Auth middleware redirects me to the login page, even if there's a session
you cannot use next-auth's session with nextjs's middleware, you have to use jwt
// auth.ts
session: {
strategy: "jwt",
},
// auth.ts
session: {
strategy: "jwt",
},
// middleware
const token = await getToken({ req });
// middleware
const token = await getToken({ req });
4 replies
TTCTheo's Typesafe Cult
Created by wailroth on 10/4/2023 in #questions
NextAuth custom properties for session
a quick console.log of user inside your session callback will show you it is actually null. You need to defined where that property is defined and set it from there, wither a database or an api
3 replies
TTCTheo's Typesafe Cult
Created by Panziewanz on 10/18/2023 in #questions
No session provider wrapping children in layout.tsx
3 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 6/17/2023 in #questions
Next 13 + Vercel (+ axiom?), how to log?
Kind bump on this 😊
2 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 6/9/2023 in #questions
How to see NextJS logs on Vercel/Axiom/BetterStack?
Any idea how i can track script execution? I want to run this endpoints as cron and i need some kind of feedback on success or errors
3 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
ok quick update again: this fixed the delay https://github.com/vercel/next.js/discussions/12517#discussioncomment-2929922 - I also had to add responseLimit: false to the config - huge W
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
I guess the next sensible approach is to try a file upload rather than send large payload through api - i will see where that leads, might be faster to upload file then just read that, and somehow delete on session close or periodically
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
update: yeah even with api endpoint, request is stuck at pending :/
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
(i built this as a CLI, but trying the web approach for non-techy users :D)
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
save file is a binary file that also contains the sqlite db dump
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
It doesnt really matter if the data is volatile - Im building a save editor for a game - users upload their save, I show them some data, they can update some data and I overwrite the sql, then send them back the save file - data is meant to be volatile
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
My main concern is that I cant instantiate sqlite in mem db on client side, hence the need to try to do it on backend (in theory?)
21 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 2/16/2023 in #questions
Send large data (~5MB) to trpc backend
@cje will try with a regular api endpoint. What do you mean by archi? is it the tech stack or the actual approach I thought of?
21 replies
TTCTheo's Typesafe Cult
Created by utdev on 12/24/2022 in #questions
Prevent trpc refetching
triggered whenever connection is lost then restored
22 replies
TTCTheo's Typesafe Cult
Created by utdev on 12/24/2022 in #questions
Prevent trpc refetching
If set to true, the query will refetch on reconnect if the data is stale. If set to false, the query will not refetch on reconnect. If set to 'always', the query will always refetch on reconnect. If set to a function, the function will be executed with the latest data and query to compute the value. Defaults to the value of networkOnline (true)
22 replies
TTCTheo's Typesafe Cult
Created by T on 1/26/2023 in #questions
Error when using middleware
Maybe would be more helpful if you could share you middleware code, or a public git repo?
4 replies
TTCTheo's Typesafe Cult
Created by Shoodey on 1/24/2023 in #questions
trpc call inside getServerSideProps?
im at my depth, this is a very tricky use case i guess? would u be intersted in hearing details maybe u could help me figure out the missing piece
15 replies
TTCTheo's Typesafe Cult
Created by iDarkLightning on 1/25/2023 in #questions
TSConfig Path Alias doesn't resolve in monorepo
didnt try with @ tbh, i dont like it lol
10 replies