Skip to content

Commit 35afe03

Browse files
authored
Merge pull request #197 from alexa/development-localhost
fix: use localhost instead of 127.0.0.1 for LWA redirect
2 parents c73061d + b4407be commit 35afe03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/runtime/lib/utils/lwa.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function accessTokenGenerator(lwaOptions: any): Promise<Token> {
3232

3333
const OAuth: OAuthClient = createOAuth(clientId, clientSecret, lwaAuthorizeHost, lwaTokenHost);
3434
const SERVER_PORT = 9090;
35-
const localServerUrl = `http://127.0.0.1:${SERVER_PORT}/cb`;
35+
const localServerUrl = `http://localhost:${SERVER_PORT}/cb`;
3636
const authorizeUrl: string = OAuth.authorizationCode.authorizeURL({
3737
redirect_uri: localServerUrl,
3838
scope: scopes,

src/utils/captchaValidator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function _openLoginUrlWithRedirectLink(captchaUrl: string, vendorId: strin
3030
["openid.claimed_id", "http://specs.openid.net/auth/2.0/identifier_select"],
3131
["openid.identity", "http://specs.openid.net/auth/2.0/identifier_select"],
3232
["openid.assoc_handle", "amzn_dante_us"],
33-
["openid.return_to", `${captchaUrl}?vendor_id=${vendorId}&redirect_url=http://127.0.0.1:${LOCALHOST_PORT}/captcha`],
33+
["openid.return_to", `${captchaUrl}?vendor_id=${vendorId}&redirect_url=http://localhost:${LOCALHOST_PORT}/captcha`],
3434
["openid.pape.max_auth_age", "7200"],
3535
]).toString();
3636
await open(loginUrl.href);

0 commit comments

Comments
 (0)