- Add AccountSwitcher component for managing user accounts with UI for switching, adding, and logging out. - Create account state manager to handle snapshots of account-specific states for efficient switching. - Introduce utility functions for account management, including ID generation and avatar color assignment. - Implement Zustand store for account management, supporting addition, removal, and state retrieval of accounts.
8 lines
333 B
TypeScript
8 lines
333 B
TypeScript
export const OAUTH_SCOPES = 'openid email profile';
|
|
export const REFRESH_TOKEN_COOKIE = 'jmap_rt';
|
|
|
|
/** Get the cookie name for a given account slot (0-4). Slot 0 uses the legacy name. */
|
|
export function refreshTokenCookieName(slot: number): string {
|
|
return slot === 0 ? REFRESH_TOKEN_COOKIE : `${REFRESH_TOKEN_COOKIE}_${slot}`;
|
|
}
|