diff --git a/CHANGELOG.md b/CHANGELOG.md index bb781a47..ddd26bca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Theme**) Change "pure black mode" paper background color to true black ### Changed +- (**General**) Preserve refresh token (UI Login) over sessions - (**Theme**) Improve automatic theme background colors - (**Theme**) Adjust "primary color" of dynamic color theme on manga pages - (**Theme**) Increase max length of custom theme names to 32 (previously 16) diff --git a/src/features/authentication/AuthManager.ts b/src/features/authentication/AuthManager.ts index d9cd7722..373952a7 100644 --- a/src/features/authentication/AuthManager.ts +++ b/src/features/authentication/AuthManager.ts @@ -93,7 +93,7 @@ export class AuthManager { } static getRefreshToken(): string | null { - return AppStorage.session.getItemParsed(AuthManager.REFRESH_TOKEN_KEY, null); + return AppStorage.local.getItemParsed(AuthManager.REFRESH_TOKEN_KEY, null); } static getTokens(): { accessToken: string | null; refreshToken: string | null } { @@ -124,7 +124,7 @@ export class AuthManager { } static setRefreshToken(token: string): void { - AppStorage.session.setItem(AuthManager.REFRESH_TOKEN_KEY, token); + AppStorage.local.setItem(AuthManager.REFRESH_TOKEN_KEY, token); AuthManager.notify(); } @@ -139,7 +139,7 @@ export class AuthManager { } static removeRefreshToken(): void { - AppStorage.session.setItem(AuthManager.REFRESH_TOKEN_KEY, undefined); + AppStorage.local.setItem(AuthManager.REFRESH_TOKEN_KEY, undefined); AuthManager.notify(); }