Github cancel UI

If a user decides the cancel on github, they see a better auth UI - is there anyway to override that?
7 Replies
Ping
Ping5mo ago
What do you mean?
Mike
Mike5mo ago
I was just wondering this myself. Click the cancel button and you get greeted by this error message. Any way to customise?
No description
No description
Ping
Ping5mo ago
Oh gotcha, yeah you can override this in the auth config:
export const auth = betterAuth({
onAPIError: {
errorURL: "/error"
}
});
export const auth = betterAuth({
onAPIError: {
errorURL: "/error"
}
});
Mike
Mike5mo ago
Great stuff thanks
Mike
Mike5mo ago
Maybe worth linking to https://www.better-auth.com/docs/reference/options#onapierror from the github page
Options | Better Auth
Better Auth configuration options reference.
khy
khyOP5mo ago
Ah nice, thanks

Did you find this page helpful?