Skip to content

Commit eab215c

Browse files
NathanFlurryclaude
andcommitted
feat(foundry): redirect to signin page on auth API errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 84a80d5 commit eab215c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

foundry/packages/backend/src/services/better-auth.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@ export function initBetterAuthService(actorClient: any, options: { apiUrl: strin
549549
strategy: "compact",
550550
},
551551
},
552+
onAPIError: {
553+
errorURL: stripTrailingSlash(options.appUrl) + "/signin",
554+
},
552555
socialProviders: {
553556
github: {
554557
clientId: requireEnv("GITHUB_CLIENT_ID"),

0 commit comments

Comments
 (0)