From 511b5def2258980b5a23f78e63c2992fb04af93e Mon Sep 17 00:00:00 2001 From: Jay Varner Date: Thu, 1 Jul 2021 15:52:47 -0400 Subject: [PATCH] Return empty user object when no token is sent --- app/controllers/ecds_rails_auth_engine/current_user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ecds_rails_auth_engine/current_user.rb b/app/controllers/ecds_rails_auth_engine/current_user.rb index 4504361..ece6f0f 100644 --- a/app/controllers/ecds_rails_auth_engine/current_user.rb +++ b/app/controllers/ecds_rails_auth_engine/current_user.rb @@ -21,7 +21,7 @@ def current_user cookies.signed[:auth] end - return nil if token.nil? + return User.new if token.nil? # begin # token = a.split(' ').last