Skip to content
Closed
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion codex-vscode/src/services/oauth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ export class OAuthService implements IOAuthService {
};

private parseQuery(uri: vscode.Uri) {
// This method parses the query string of the URI and returns an object
// where each query parameter becomes a key-value pair.
return uri.query.split("&").reduce((prev: any, current) => {
// important to split
const queryString = current.split("=");
prev[queryString[0]] = queryString[1];
return prev;
}, {});
}


private clearCodeExchangePromise = (): void => {
OAuthService.codeExchangePromise = undefined;
};
Expand Down