question

newuser-4c993a9a-4be5-4d30-9631-4547f3163b59 avatar image

How to open LWA sign in in the same tab using Android Chrome

Hi, we have a website where we use Cognito with LWA as an external IDP. We are using AWS Amplify SDK to make the calls to do sign ins (by calling Auth.federatedSignIn).

For security reasons, we also set oauth storage to session storage instead of local storage so that we don't persist the session between tabs.

The problem we have though on Android Chrome is that the LWA sign in is being open in a new tab, and therefore the website can't mark the user as being signed in. We do not have this issue on other devices (computer, ios).

How can we fix the issue and always have the LWA page open within the same tab ?

login with amazonandroidaws
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Arun@Amazon avatar image
Arun@Amazon answered

Hi there,

By default, the SDK will display the login screen in a popup window. You can set the popup property of the options parameter to false to instead redirect customers to a new page to login. Please refer the amazon developer docs portal link below.

https://developer.amazon.com/docs/login-with-amazon/install-sdk-javascript.html

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.