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

Add class to target logout action #15080

Closed
wants to merge 1 commit into from

Conversation

dododedodonl
Copy link
Contributor

Description

A way to be able to target the logout button/form without having to override the user menu view (instead of #15051).

Visual changes

None

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin
Copy link
Member

Since this element isn't going to exist in v4 in the same way (after moving to actions), I am hesitant to introduce it as a hook class, since it will then create a breaking change when upgrading. Sorry.

@danharrin danharrin closed this Dec 14, 2024
@dododedodonl
Copy link
Contributor Author

Since this element isn't going to exist in v4 in the same way (after moving to actions), I am hesitant to introduce it as a hook class, since it will then create a breaking change when upgrading. Sorry.

Any suggestions of how to trigger javascript on logout then?

@danharrin
Copy link
Member

What is the Javascript going to do?

@dododedodonl
Copy link
Contributor Author

What is the Javascript going to do?

Clear 3 keys from local storage

@danharrin
Copy link
Member

danharrin commented Dec 16, 2024

How about doing that in a render hook <script> on the login page, when the login page is loaded?

@dododedodonl
Copy link
Contributor Author

How about doing that in a render hook <script> on the login page, when the login page is loaded?

It effectively signs the user out from a different but linked system running on a subpath of the domain, so that would not be viable because of security.

@danharrin
Copy link
Member

How about adding a value to the session on logout (in the LogoutResponse object or similar), and then only outputting the script on login if that is present

@dododedodonl
Copy link
Contributor Author

How about adding a value to the session on logout (in the LogoutResponse object or similar), and then only outputting the script on login if that is present

Well, the problem is, users are not logged out from the linked system when they think they are. That system can be independently reached, but logs in using the same laravel.

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

Successfully merging this pull request may close these issues.

2 participants