fix(auth): trim opencode server username

This commit is contained in:
Bohdan Triapitsyn
2026-06-23 21:52:51 +03:00
parent 4feddfa810
commit 2fd86db6a7
2 changed files with 2 additions and 2 deletions
@@ -51,7 +51,7 @@ export const createOpenCodeAuthStateRuntime = (dependencies) => {
return {};
}
const username = process.env.OPENCODE_SERVER_USERNAME || 'opencode';
const username = process.env.OPENCODE_SERVER_USERNAME?.trim() || 'opencode';
const credentials = Buffer.from(`${username}:${password}`).toString('base64');
return { Authorization: `Basic ${credentials}` };
};