Better AuthBA
Better Authโ€ข3mo ago
Noah-Haf

SignIn "callbackURL" not functioning as expected.

Hello,

I'm attempting to implement betterauth into my nextjs application and I'm hitting some bottlenecks.

await authClient.signUp.email(
                {
                    email: value.email,
                    password: value.password,
                    name: `${value.forename} ${value.surname}`,
                    callbackURL: "/app",
                },
                {
                    onRequest: () => {
                        setDebounce(true);
                    },
                    onError: (ctx) => {
                        setDebounce(false);
                        toast.error(ctx.error.message);
                    },
                },
            );


After I successfully signed up I'm not redirected to the "/app" path. Am I incorrectly using the callbackURL?

Many thanks,
Noah
Was this page helpful?