Maqed
BABetter Auth
•Created by Dennski on 2/26/2025 in #help
Help with Better-Auth in Next.js – useSession Causing 404 Error
At auth-client.ts:
Change the "better-auth/client" to "better-auth/react"
5 replies
BABetter Auth
•Created by Maqed on 2/5/2025 in #help
Can I use Phone Number plugin to just add phone number to existing users?
Thank you! It worked! ❤️
11 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
But what happens if the session is expired? The session token is still in the cookie but it won't work so it won't redirect the user to /login. Right?
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Thank you for reminding me!
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
@daveycodez That works! Thank you so much! ❤️
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
I'm testing that. Gimme a second
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
I'll try that
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Just ignore the localization part of the middleware
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
middleware.ts:
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Here's what's going on in oauth
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Email/pass make a new cookie that's sent to the browser. But for some reason, it's not reaching th middleware. Here's a video of what's going on from the email/password side
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
@bekacru Is there any way to fix it?
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Headers contain the session cookie. Also I've just noticed that the problem occurs ONLY in email/password login. It doesn't occur in OAuth signin
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
@admin
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
It's still an issue even after using better-fetch
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Thank you bro for trying to help ❤️
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
But I'll give it a try
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
I hope there's a solution for this problem with normal fetch
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
The problem here is it's using betterFetch and I don't wanna install another package just for the middleware to work
45 replies
BABetter Auth
•Created by Maqed on 2/2/2025 in #help
Session fetched in the middleware doesn't update on every request.
Nope, As shown in the docs, Nextjs middleware doesn't have access to node APIs https://www.better-auth.com/docs/integrations/next#middleware
45 replies