Shyam Verma
Shyam Verma
BABetter Auth
Created by Shyam Verma on 4/4/2025 in #help
Error on Signup with OTP
I had match both otp store in database and otp which was sent
7 replies
BABetter Auth
Created by Shyam Verma on 4/4/2025 in #help
Error on Signup with OTP
yes i am sure
7 replies
BABetter Auth
Created by shabiii on 4/4/2025 in #help
Nextjs middleware not working
Yes, definetly
14 replies
BABetter Auth
Created by shabiii on 4/4/2025 in #help
Nextjs middleware not working
what's the need of this. use defaults names
14 replies
BABetter Auth
Created by shabiii on 4/4/2025 in #help
Nextjs middleware not working
??
14 replies
BABetter Auth
Created by Shyam Verma on 4/4/2025 in #help
Error on Signup with OTP
Hey! Is there is somone please help me
7 replies
BABetter Auth
Created by shabiii on 4/4/2025 in #help
Nextjs middleware not working
You can use package @better-fetch/fetch for getting session in middleware like this:
ts
const { data: session } = await betterFetch<Session>("/api/auth/get-session", {
baseURL: process.env.BETTER_AUTH_URL,
headers: { cookie: request.headers.get("cookie") || "" },
});
ts
const { data: session } = await betterFetch<Session>("/api/auth/get-session", {
baseURL: process.env.BETTER_AUTH_URL,
headers: { cookie: request.headers.get("cookie") || "" },
});
14 replies