Skip to content

Conversation

@waxlamp
Copy link
Member

@waxlamp waxlamp commented Dec 17, 2025

No description provided.

waxlamp and others added 3 commits December 15, 2025 15:06
This is the correct way to "log the user out of the API", even if it
involves users having to confirm their logout action. The reason for
that, in turn, has to do with preventing CSRF attacks against a user's
login state.

The `ACCOUNT_LOGOUT_REDIRECT_URL` governs where the user is taken after
logout completes. We can't use the logout view URL's `next` parameter
because the redirect target is on a different domain from the backend.
This commit leaves the logout view broken (specifically, without any CSS
styles, among other things). To "fix" it in dev, rename "base.html" to
something else (so that the template engine grabs base.html from the
allauth package instead).
@jjnesbitt
Copy link
Member

localStorage.clear();
}

window.location.href = 'http://localhost:8000/accounts/logout/'
Copy link
Member

Choose a reason for hiding this comment

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

This should use the env var for the API

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.

3 participants