diff --git a/src/auth/oauth.js b/src/auth/oauth.js index 4978030..036292e 100644 --- a/src/auth/oauth.js +++ b/src/auth/oauth.js @@ -131,10 +131,10 @@ export function startCallbackServer(expectedState, timeoutMs = 120000) { const error = url.searchParams.get('error'); if (error) { - res.writeHead(400, { 'Content-Type': 'text/html' }); + res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(` -
Error: ${error}
@@ -148,10 +148,10 @@ export function startCallbackServer(expectedState, timeoutMs = 120000) { } if (state !== expectedState) { - res.writeHead(400, { 'Content-Type': 'text/html' }); + res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(` -State mismatch - possible CSRF attack.
@@ -165,10 +165,10 @@ export function startCallbackServer(expectedState, timeoutMs = 120000) { } if (!code) { - res.writeHead(400, { 'Content-Type': 'text/html' }); + res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(` -No authorization code received.
@@ -182,10 +182,10 @@ export function startCallbackServer(expectedState, timeoutMs = 120000) { } // Success! - res.writeHead(200, { 'Content-Type': 'text/html' }); + res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(` -You can close this window and return to the terminal.