Skip to content

Commit d9979b9

Browse files
committed
fix(cli): fix auth url
1 parent 91322c2 commit d9979b9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/perfect-windows-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"replexica": patch
3+
---
4+
5+
fix auth redirect url in cli

packages/cli/src/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default new Command()
2222
await saveSettings(settings);
2323
}
2424
if (options.login) {
25-
const apiKey = await login(settings.auth.apiUrl);
25+
const apiKey = await login(settings.auth.webUrl);
2626
settings.auth.apiKey = apiKey;
2727
await saveSettings(settings);
2828
settings = await loadSettings();
@@ -43,15 +43,15 @@ export default new Command()
4343
}
4444
});
4545

46-
async function login(apiUrl: string) {
46+
async function login(webAppUrl: string) {
4747
await readline.createInterface({
4848
input: process.stdin,
4949
output: process.stdout,
5050
}).question('Press Enter to open the browser for authentication\n');
5151

5252
const spinner = Ora().start('Waiting for the API key');
5353
const apiKey = await waitForApiKey(async (port) => {
54-
await open(`${apiUrl}/app/cli?port=${port}`, { wait: false });
54+
await open(`${webAppUrl}/app/cli?port=${port}`, { wait: false });
5555
});
5656
spinner.succeed('API key received');
5757

0 commit comments

Comments
 (0)