Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6c2cd35
Add multi-account auth support with quick account switcher UI
PriyanshAg-1 Apr 20, 2026
9009259
Merge pull request #1 from priyanshrv1-oss/capy/multi-account-switcher
priyanshrv1-oss Apr 20, 2026
a763f77
Add confirmation modal for account removal
PriyanshAg-1 Apr 20, 2026
8ad07f8
Merge pull request #2 from priyanshrv1-oss/capy/add-account-remove-co…
priyanshrv1-oss Apr 20, 2026
8c405b7
Fix account switch session validation during refresh (#4)
capy-ai[bot] Apr 20, 2026
ffec305
Fix async session state in handleSwitchAccount - pass fresh session t…
PriyanshAg-1 Apr 22, 2026
905b8e1
Merge pull request #5 from priyanshrv1-oss/fix-async-session-state
PriyanshAg-1 Apr 22, 2026
b3909af
Fix all remaining Copilot review issues: auth session null returns, e…
PriyanshAg-1 Apr 22, 2026
df76988
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
9eae745
fix: use menu ARIA roles in account dropdown and return getSession() …
Copilot Apr 22, 2026
bfde5dc
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
ffab5bb
fix: add role=none to structural wrappers in menu and fix embedded li…
Copilot Apr 22, 2026
a0bf7b5
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
42d4257
Change logoutAll to logout in auth service
PriyanshAg-1 Apr 22, 2026
463cfe4
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
96c57e7
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
72a2b4f
Potential fix for pull request finding
PriyanshAg-1 Apr 22, 2026
75c26e9
Merge pull request #6 from priyanshrv1-oss/fix-copilot-reviews
PriyanshAg-1 Apr 22, 2026
71fd1cd
Update opennow-stable/src/main/gfn/auth.ts
PriyanshAg-1 Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 217 additions & 41 deletions opennow-stable/src/main/gfn/auth.ts

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions opennow-stable/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,18 @@ function registerIpcHandlers(): void {
await authService.logout();
});

ipcMain.handle(IPC_CHANNELS.AUTH_GET_SAVED_ACCOUNTS, async () => {
return authService.getSavedAccounts();
});

ipcMain.handle(IPC_CHANNELS.AUTH_SWITCH_ACCOUNT, async (_event, userId: string) => {
return authService.switchAccount(userId);
});

ipcMain.handle(IPC_CHANNELS.AUTH_REMOVE_ACCOUNT, async (_event, userId: string) => {
await authService.removeAccount(userId);
});

ipcMain.handle(IPC_CHANNELS.SUBSCRIPTION_FETCH, async (_event, payload: SubscriptionFetchRequest) => {
const token = await resolveJwt(payload?.token);
const streamingBaseUrl =
Expand Down
6 changes: 6 additions & 0 deletions opennow-stable/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import electron from "electron";
import { IPC_CHANNELS } from "@shared/ipc";
import type {
AuthLoginRequest,
AuthSession,
AuthSessionRequest,
GamesFetchRequest,
CatalogBrowseRequest,
ResolveLaunchIdRequest,
RegionsFetchRequest,
MainToRendererSignalingEvent,
OpenNowApi,
SavedAccount,
SessionAdReportRequest,
SessionCreateRequest,
SessionPollRequest,
Expand Down Expand Up @@ -63,6 +65,10 @@ const api: OpenNowApi = {
getRegions: (input: RegionsFetchRequest = {}) => ipcRenderer.invoke(IPC_CHANNELS.AUTH_GET_REGIONS, input),
login: (input: AuthLoginRequest) => ipcRenderer.invoke(IPC_CHANNELS.AUTH_LOGIN, input),
logout: () => ipcRenderer.invoke(IPC_CHANNELS.AUTH_LOGOUT),
getSavedAccounts: (): Promise<SavedAccount[]> => ipcRenderer.invoke(IPC_CHANNELS.AUTH_GET_SAVED_ACCOUNTS),
switchAccount: (userId: string): Promise<AuthSession> =>
ipcRenderer.invoke(IPC_CHANNELS.AUTH_SWITCH_ACCOUNT, userId),
removeAccount: (userId: string): Promise<void> => ipcRenderer.invoke(IPC_CHANNELS.AUTH_REMOVE_ACCOUNT, userId),
fetchSubscription: (input: SubscriptionFetchRequest) =>
ipcRenderer.invoke(IPC_CHANNELS.SUBSCRIPTION_FETCH, input),
fetchMainGames: (input: GamesFetchRequest) => ipcRenderer.invoke(IPC_CHANNELS.GAMES_FETCH_MAIN, input),
Expand Down
Loading
Loading