diff --git a/src/auth.ts b/src/auth.ts index a30d0bd..2ba6b99 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -149,7 +149,7 @@ function loadTokens(): StoredElawayToken | null { async function startOauth(): Promise { let tokenResponse: ElawayTokenResponse | null = null; let accessIdResponse: null | IdTokenResponse = null; - const authUrl = `${elawayAuthorizationUrl}?response_type=code&client_id=${encodeURIComponent(appClientId)}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${encodeURIComponent(oauthScope)}&state=${encodeURIComponent(state)}`; + const authUrl = `${elawayAuthorizationUrl}?response_type=code&client_id=${encodeURIComponent(clientId)}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${encodeURIComponent(oauthScope)}&state=${encodeURIComponent(state)}`; const browser = await puppeteer.launch({ headless: true }); const page = await browser.newPage();