Skip to content

Commit

Permalink
Revoke all user sessions on password reset
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldar committed Sep 9, 2024
1 parent e122761 commit f07bb80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plausible_web/live/reset_password_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ defmodule PlausibleWeb.Live.ResetPasswordForm do

alias Plausible.Auth
alias Plausible.Repo
alias PlausibleWeb.UserAuth

def mount(_params, %{"email" => email}, socket) do
socket =
Expand Down Expand Up @@ -96,7 +97,8 @@ defmodule PlausibleWeb.Live.ResetPasswordForm do
end)

case result do
{:ok, _user} ->
{:ok, user} ->
UserAuth.revoke_all_user_sessions(user)
{:noreply, assign(socket, trigger_submit: true)}

{:error, changeset} ->
Expand Down

0 comments on commit f07bb80

Please sign in to comment.