1
0
Fork 0
forked from OpenNeo/impress

Oops, stay signed in when changing password

This commit is contained in:
Emi Matchu 2024-04-08 04:12:46 -07:00
parent ae2b62956a
commit 0f5bb2a861

View file

@ -25,6 +25,10 @@ class AuthUsersController < ApplicationController
@auth_user = load_auth_user
if @auth_user.update_with_password(auth_user_params)
# NOTE: Changing the password will sign you out, so make sure we stay
# signed in!
bypass_sign_in @auth_user, scope: :auth_user
flash[:notice] = "Settings successfully saved."
redirect_to action: :edit
else