Skip to content

Commit a1e729c

Browse files
dont overwrite existing token on login
1 parent 8bd55a9 commit a1e729c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/api/v1/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def resend_confirm
4545
def login
4646
user = User.find_by(email: login_user_params[:email])
4747
if user && user.authenticate(login_user_params[:password])
48-
token = user.generate_token(true)
48+
token = user.generate_token(false) # DONT OVERWRITE EXISTING TOKEN
4949
render json: { user: user, auth: token }
5050
else
5151
render json: { error: 'Invalid email password combination' }, status: 400

0 commit comments

Comments
 (0)