mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
improve fallbacks for redirection
This commit is contained in:
@@ -316,10 +316,7 @@ export class Authenticator<Strategies extends Record<string, Strategy> = Record<
|
|||||||
return c.json(data);
|
return c.json(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const successUrl = this.getSafeUrl(
|
const successUrl = this.getSafeUrl(c, redirect ?? this.config.cookie.pathSuccess ?? "/");
|
||||||
c,
|
|
||||||
redirect ? redirect : (this.config.cookie.pathSuccess ?? "/")
|
|
||||||
);
|
|
||||||
const referer = redirect ?? c.req.header("Referer") ?? successUrl;
|
const referer = redirect ?? c.req.header("Referer") ?? successUrl;
|
||||||
//console.log("auth respond", { redirect, successUrl, successPath });
|
//console.log("auth respond", { redirect, successUrl, successPath });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user