Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Sep 15, 2025

Fix #563

Session might expire or user can be logged out for some reason but still continue to author. Editor does not detect this case and still allow user to edit for an infinite time (until page reload).

Test: https://kickout--da-live--adobe.aem.live/

  • Sign in to a project
  • Open a page for authoring
  • Open a new tab with the explorer and sign out
  • Go back to editor, make edits. Reload will happen after one or 2s and force user to sign-in again. Minimal changes are lost.

@aem-code-sync
Copy link

aem-code-sync bot commented Sep 15, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync
Copy link

aem-code-sync bot commented Sep 15, 2025

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@kptdobe kptdobe marked this pull request as draft September 15, 2025 12:37
@kptdobe
Copy link
Contributor Author

kptdobe commented Sep 15, 2025

Need to check.. I get multiple reloads of the page before IMS decides to go to the login page. Weird.

@auniverseaway
Copy link
Member

I like this idea. I would probably simplify this, though: If we get a 401 / 403 back from collab, just refresh the page.

The person likely needs to refresh the token they're using for collab. If you use DA at least once every two weeks, you can refresh for up to 364 days. There's no reason to forcefully log them out.

The other advantage is that if they are truly unauthorized now, the existing DA machinery will boot them. Any future improvements we make to the unauthorized flow this will get for free.

@chrischrischris
Copy link
Contributor

This forces the user into the ims signin screen, but is a bit confusing as it does it with no warning. I wonder if we should have a dialog alerting the user with the option to signin again or go to da home? @auniverseaway thoughts?

await loadIms();
handleSignIn();
// wait 1 second to let ims do its things
await new Promise((resolve) => { setTimeout(resolve, 1000); });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to verify - handleSignIn will force a page redirect to ims, so this await will be cut short on page navigation?

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

Successfully merging this pull request may close these issues.

Disconnect user if a 401 happens in collab

4 participants