From aa96588376a99159ea931f52cb20e745b369778c Mon Sep 17 00:00:00 2001 From: Evan Marell Date: Mon, 19 Mar 2018 15:24:38 -0700 Subject: [PATCH] Remove superfluous call to `#create_new_auth_token`. * There was prior discussion around removing this line of code, inside lynndylanhurley/devise_token_auth#990. See: https://github.com/lynndylanhurley/devise_token_auth/pull/990#discussion_r152407770 * While line in question _is_ superfluous, removing it was blocked by a bad test. This test was corrected in the previous commit (9ebc5bd7). --- .../devise_token_auth/concerns/set_user_by_token.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/devise_token_auth/concerns/set_user_by_token.rb b/app/controllers/devise_token_auth/concerns/set_user_by_token.rb index aaa930b5c..7a20cc351 100644 --- a/app/controllers/devise_token_auth/concerns/set_user_by_token.rb +++ b/app/controllers/devise_token_auth/concerns/set_user_by_token.rb @@ -60,7 +60,9 @@ def set_user_by_token(mapping=nil) if devise_warden_user && devise_warden_user.tokens[@client_id].nil? @used_auth_by_token = false @resource = devise_warden_user - @resource.create_new_auth_token + # REVIEW: The following line _should_ be safe to remove; + # the generated token does not get used anywhere. + # @resource.create_new_auth_token end end