lyra-ai-agent 0.1.2 → 0.1.3
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/commands/login.ts +5 -2
package/package.json
CHANGED
package/src/commands/login.ts
CHANGED
|
@@ -85,11 +85,14 @@ export async function deviceLink(deps: LoginDeps): Promise<LoginResult> {
|
|
|
85
85
|
throw new Error(`login/start failed (HTTP ${startRes.status}) at ${base}`)
|
|
86
86
|
}
|
|
87
87
|
const start = (await startRes.json()) as LoginStart
|
|
88
|
-
if (!start?.code || !start?.pollToken
|
|
88
|
+
if (!start?.code || !start?.pollToken) {
|
|
89
89
|
throw new Error('login/start returned an unexpected response')
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
// Build the verify link from OUR base (where we pointed login), not the server's
|
|
93
|
+
// reported origin — that can resolve to an internal proxy host behind a reverse
|
|
94
|
+
// proxy. The CLI knows the public URL it called, so use it.
|
|
95
|
+
const linkUrl = `${base}/cli-login?code=${encodeURIComponent(start.code)}`
|
|
93
96
|
log('')
|
|
94
97
|
log('Approve this login in your browser:')
|
|
95
98
|
log(` ${linkUrl}`)
|