October 24, 2024
Chicago 12, Melborne City, USA
Android

Force to open on PWA from chrome


Currently I clicked the link on chrome browser and it opened on PWA with loading page. And then chrome browser responses api with new URL and I want to open this new URL on PWA again. But new URL can’t open again on PWA. I used NextJS and next-pwa package.

I want to open again the new URL the response from chrome broswer on PWA.

I can see the loading page on PWA. But after got target_url from login API, it’s still stuck on loading page.

const openWindow = window.open(
              `/loading?accessToken=${access_token}`,
              'launch',
              'width=1025px,height=600px'
            );
            addWindow(openWindow);
            loginApi(openWindow, payload);
export const addWindow= function (openWindow) {
  window.allWindowList || (window.allWindowList = []);
  window.allWindowList.push(openWindow);
};
// open new windoe after loginApi 
if (statusTranspointApi.status === 200) {
        openWindow.location.href = data.target_url;
}



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video