Sebastian
BABetter Auth
•Created by Sebastian on 5/24/2025 in #bug-reports
Redirect Callback Bug
Hi, I am using
linkSocial
and want to handle any errors on my custom page rather than on the default api error page.
I discovered that in the parseState errorURL
is being set in case it's not in the state object.
This leads to the error url of redirectOnError
always being this default error url see here.
I could create a PR to fix this, but I am not quite familiar whether this would introduce new unwanted behaviours.
---
TLDR: The onAPIError errorURL
is being overwritten by parseState
2 replies
BABetter Auth
•Created by Sebastian on 5/20/2025 in #help
How to enforce user's to set certain user properties?
Hi,
I've been thinking on this for a while now. How do I force user's after the first login (or possibly on admin reset) to set certain attributes like a username?
Right now I use a middleware, but I read in the docs that this might not be the best idea (and also for some reason the middleware stopped working after my last prod update).
In Next.js middleware, it's recommended to only check for the existence of a session cookie to handle redirection. To avoid blocking requests by making API or database calls.
This "problem" can be generalized into other problems like user needs to accept terms, user needs to do a onboarding...
How would you implement something like that?
I also though about putting a check in root layout - but also here the nextjs docs says "Reading the current URL from a Server Component is not supported. This design is intentional to support layout state being preserved across page navigations."3 replies