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

Implement MSC2965 action parameter #1673

Merged
merged 10 commits into from
Sep 1, 2023
Merged

Conversation

kerryarchibald
Copy link
Contributor

@kerryarchibald kerryarchibald commented Sep 1, 2023

Fixes #1550

Redirects to session detail when query param action=session_end is encountered.

Screen.Recording.2023-09-01.at.14.48.35.mov


const [route, setRoute] = useAtom(routeAtom);
if (redirect) {
setRoute(redirect.route, redirect.searchParams);
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be in a useEffect, because you're not supposed to do state changes in the render?

Copy link

Choose a reason for hiding this comment

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

Kerry won't see this before Monday, sadly, and we have to land this PR today. @t3chguy could you help us out by giving advice?

Copy link
Member

Choose a reason for hiding this comment

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

I can take care of finishing that up, alongside the server side of this

Copy link
Member

Choose a reason for hiding this comment

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

Yes I believe it should be in a useEffect

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 1, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 651d948
Status: ✅  Deploy successful!
Preview URL: https://9e670dbd.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://kerry-1550-logout-deep-link.matrix-authentication-service-docs.pages.dev

View logs

@sandhose
Copy link
Member

sandhose commented Sep 1, 2023

Alright, I:

  • refactored a bit the router
  • did the backend part of the redirect so that params are kept through the login
  • implemented the other action defined in the MSC on the frontend

@sandhose sandhose changed the title Redirect to session detail from logout link Implement MSC2965 action parameter Sep 1, 2023
@sandhose sandhose enabled auto-merge (squash) September 1, 2023 09:35
@sandhose sandhose merged commit 17f8dc4 into main Sep 1, 2023
23 checks passed
@sandhose sandhose deleted the kerry/1550/logout-deep-link branch September 1, 2023 14:55
germain-gg pushed a commit to element-hq/compound-web that referenced this pull request Sep 28, 2023
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.

DM: Session end deep-link
4 participants