github-auth: revert sessions-specific auth branding (#315792)

Revert PR #298277 changes since agents is no longer a separate app.
Removes sessions icon swap from the auth redirect page, the
agentSessionsWorkspace API usage, and the sessions-icon.svg asset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Sandeep Somavarapu
2026-05-11 20:01:16 +02:00
committed by GitHub
parent 2890faaee8
commit 58f8ecdb3d
5 changed files with 8 additions and 43 deletions
@@ -7,7 +7,7 @@ import { URL } from 'url';
import * as fs from 'fs';
import * as path from 'path';
import { randomBytes } from 'crypto';
import { env, workspace } from 'vscode';
import { env } from 'vscode';
function sendFile(res: http.ServerResponse, filepath: string) {
const isSvg = filepath.endsWith('.svg');
@@ -99,14 +99,13 @@ export class LoopbackAuthServer implements ILoopbackServer {
this._resultPromise = new Promise<IOAuthResult>((resolve, reject) => deferred = { resolve, reject });
const appNameQueryParam = `&app_name=${encodeURIComponent(env.appName)}`;
const appIsSessionsQueryParam = workspace.isAgentSessionsWorkspace ? '&app_is_sessions=true' : '';
this._server = http.createServer((req, res) => {
const reqUrl = new URL(req.url!, `http://${req.headers.host}`);
switch (reqUrl.pathname) {
case '/signin': {
const receivedNonce = (reqUrl.searchParams.get('nonce') ?? '').replace(/ /g, '+');
if (receivedNonce !== this.nonce) {
res.writeHead(302, { location: `/?error=${encodeURIComponent('Nonce does not match.')}${appNameQueryParam}${appIsSessionsQueryParam}` });
res.writeHead(302, { location: `/?error=${encodeURIComponent('Nonce does not match.')}${appNameQueryParam}` });
res.end();
}
res.writeHead(302, { location: this._startingRedirect.toString() });
@@ -123,20 +122,20 @@ export class LoopbackAuthServer implements ILoopbackServer {
return;
}
if (this.state !== state) {
res.writeHead(302, { location: `/?error=${encodeURIComponent('State does not match.')}${appNameQueryParam}${appIsSessionsQueryParam}` });
res.writeHead(302, { location: `/?error=${encodeURIComponent('State does not match.')}${appNameQueryParam}` });
res.end();
throw new Error('State does not match.');
}
if (this.nonce !== nonce) {
res.writeHead(302, { location: `/?error=${encodeURIComponent('Nonce does not match.')}${appNameQueryParam}${appIsSessionsQueryParam}` });
res.writeHead(302, { location: `/?error=${encodeURIComponent('Nonce does not match.')}${appNameQueryParam}` });
res.end();
throw new Error('Nonce does not match.');
}
deferred.resolve({ code, state });
if (isPortable) {
res.writeHead(302, { location: `/?app_name=${encodeURIComponent(env.appName)}${appIsSessionsQueryParam}` });
res.writeHead(302, { location: `/?app_name=${encodeURIComponent(env.appName)}` });
} else {
res.writeHead(302, { location: `/?redirect_uri=${encodeURIComponent(callbackUri)}${appNameQueryParam}${appIsSessionsQueryParam}` });
res.writeHead(302, { location: `/?redirect_uri=${encodeURIComponent(callbackUri)}${appNameQueryParam}` });
}
res.end();
break;