vibecodingmachine-cli 1.0.6 ā 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/auth.js +21 -2
package/package.json
CHANGED
package/src/utils/auth.js
CHANGED
|
@@ -240,8 +240,9 @@ class CLIAuth {
|
|
|
240
240
|
// VS Code Remote SSH - use optimized flow with instructions
|
|
241
241
|
if (isVSCodeRemote && !options.headless) {
|
|
242
242
|
console.log(chalk.cyan('\nš VS Code Remote SSH Detected!\n'));
|
|
243
|
-
console.log(chalk.
|
|
244
|
-
console.log(chalk.
|
|
243
|
+
console.log(chalk.yellow('ā ļø IMPORTANT: VS Code will show "Port 3000 is now available"'));
|
|
244
|
+
console.log(chalk.yellow(' ā DO NOT click that notification!'));
|
|
245
|
+
console.log(chalk.yellow(' ā Instead, Ctrl+Click the authentication URL shown below\n'));
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
// Standard browser-based login
|
|
@@ -252,10 +253,28 @@ class CLIAuth {
|
|
|
252
253
|
const codeVerifier = generateCodeVerifier();
|
|
253
254
|
const codeChallenge = generateCodeChallenge(codeVerifier);
|
|
254
255
|
|
|
256
|
+
// Build Cognito OAuth URL with PKCE - force Google account picker every time
|
|
257
|
+
const authUrl = `https://${COGNITO_DOMAIN}/oauth2/authorize?` +
|
|
258
|
+
`client_id=${CLIENT_ID}&` +
|
|
259
|
+
`response_type=code&` +
|
|
260
|
+
`scope=email+openid+profile&` +
|
|
261
|
+
`redirect_uri=http://localhost:${PORT}/callback&` +
|
|
262
|
+
`code_challenge=${codeChallenge}&` +
|
|
263
|
+
`code_challenge_method=S256&` +
|
|
264
|
+
`identity_provider=Google&` +
|
|
265
|
+
`prompt=select_account`;
|
|
266
|
+
|
|
255
267
|
// Create local server to receive callback
|
|
256
268
|
const server = http.createServer(async (req, res) => {
|
|
257
269
|
const url = new URL(req.url, `http://localhost:${PORT}`);
|
|
258
270
|
|
|
271
|
+
// Root path - redirect to auth URL (for VS Code "Open in Browser" clicks)
|
|
272
|
+
if (url.pathname === '/') {
|
|
273
|
+
res.writeHead(302, { 'Location': authUrl });
|
|
274
|
+
res.end();
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
|
|
259
278
|
if (url.pathname === '/callback') {
|
|
260
279
|
// Extract authorization code from query params
|
|
261
280
|
const code = url.searchParams.get('code');
|