auth error should not redirect to parameter, adapter app function should fire correctly

This commit is contained in:
dswbx
2025-07-09 08:00:52 +02:00
parent 957355c862
commit 2b32a836cd
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ export async function createAdapterApp<Config extends BkndConfig = BkndConfig, A
connection = config.connection;
} else {
const sqlite = (await import("bknd/adapter/sqlite")).sqlite;
const conf = config.connection ?? { url: ":memory:" };
const conf = appConfig.connection ?? { url: ":memory:" };
connection = sqlite(conf);
$console.info(`Using ${connection.name} connection`, conf.url);
}

View File

@@ -225,7 +225,7 @@ export class Authenticator<Strategies extends Record<string, Strategy> = Record<
await addFlashMessage(c, String(error), "error");
const referer = this.getSafeUrl(c, opts?.redirect ?? c.req.header("Referer") ?? "/");
const referer = this.getSafeUrl(c, c.req.header("Referer") ?? "/");
return c.redirect(referer);
}