Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onAuthFail not working #900

Open
zhoulhcn opened this issue Jul 23, 2024 · 0 comments
Open

onAuthFail not working #900

zhoulhcn opened this issue Jul 23, 2024 · 0 comments

Comments

@zhoulhcn
Copy link

function initialAmazonCCP() {
  const connect = window.connect;
  const ccpUrl = CCP_URL;
  connect.core.initCCP(ccpRef.value, {
    ccpUrl,
    loginUrl: CCP_LOGIN_SSO_URL,
    loginPopup: false
  });
}
connect.core.onAuthFail(function () {
  console.log('Core auth failed');
});
connect.core.onIframeRetriesExhausted(() => {
  console.log('Core iframe retries exhausted');
});
connect.core.onInitialized(function () {
  console.log('Core initialized');
});

I called the initialAmazonCCP method on page A, then I opened page B with the URL CCP_LOGIN_SSO_URL to login my account, At that moment, onInitialized was called on page A, that's what I expect. Then I logout my account on page B to simulate token expiration, then I refreshed page A, onAuthFail was not called,after about 1 mins onIframeRetriesExhausted be called,but onAuthFail never called.

This is my first time submitting an issue and my English is not so good. hope you can understand what I am trying to say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant