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 logout route/feature. #14

Open
enthus1ast opened this issue Dec 9, 2020 · 2 comments
Open

Add logout route/feature. #14

enthus1ast opened this issue Dec 9, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@enthus1ast
Copy link

Add a logout route that logs a user out and redirects to a given url

@enthus1ast
Copy link
Author

as a workaround i use a logout link that does a ajax call to the backends logout route:

<!-- In my menu.twig -->
<a class="nav-link" href="#" onclick="logout()">logout({{user.username}})</a>
function logout() {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.status == 200) {
      window.location.reload();
    }
  };
  xhttp.open("GET", "/bolt/logout", true);
  xhttp.send();
}

@I-Valchev I-Valchev added enhancement New feature or request good first issue Good for newcomers labels Dec 10, 2020
@crim3hound
Copy link
Contributor

Perhaps related to Issue #11 @I-Valchev? Could also check the chain of PRs made, particularly PR #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants