ayush_uidev
TTCTheo's Typesafe Cult
•Created by ayush_uidev on 7/8/2023 in #questions
Zod type email string and number message not working correctly
Hey guys i am facing a issue i am also new to typescript
i am using this type for react-hooks-forms and i want the email to either be string or number and when it is number show Invalid number message and when incorrect email message but it is only showing email message everytime how can i achive something like this
4 replies
TTCTheo's Typesafe Cult
•Created by ayush_uidev on 7/6/2023 in #questions
Redirect next-auth signIn to history page
Hi guys i am facing a issue i have create a custom signin page and i am using credientials provider how to achive the redirect after signIn to the page it was opened before log in. like if i dont have a sigin page the default signpage of next-auth redirect to the perticulate page i have been redirected to the signin page how can i achive auth redirect after
for more context i am using nextjs app dir
18 replies
TTCTheo's Typesafe Cult
•Created by ayush_uidev on 6/19/2023 in #questions
Passing and Accessing Authentication Tokens from External Backend to Client-side Components in Next.
How can I pass the authentication token obtained from an external backend to client-side components in Next.js when using Next-Auth for authentication? I am currently using const session = await getServerSession(authOptions); in server-side components, but how can I access the session in client-side components?
dir app/api/auth/[...nextauth]
9 replies