Handle Better Auth POST route
POST
/api/auth/{authPath}
const url = 'https://example.com/api/auth/example';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/exampleCatch-all route delegated to Better Auth for sign-in, sign-up, sign-out, and other auth POST flows.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” authPath
required
string
Responses
Section titled “ Responses ”Better Auth handled the POST request.
Better Auth rejected the request.