add built state and skip auth cookie if not signed in for local calls

This commit is contained in:
dswbx
2025-01-25 19:30:03 +01:00
parent 2d6d83ccb2
commit 39c419c320
3 changed files with 11 additions and 2 deletions

View File

@@ -259,7 +259,7 @@ export class Authenticator<Strategies extends Record<string, Strategy> = Record<
}
async requestCookieRefresh(c: Context) {
if (this.config.cookie.renew) {
if (this.config.cookie.renew && this.isUserLoggedIn()) {
const token = await this.getAuthCookie(c);
if (token) {
await this.setAuthCookie(c, token);