From b7e3065ece9a11d1de77695f4fb57ab9c2e8cd16 Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:53:29 +0000 Subject: [PATCH] Update to redirect when already logged in (#1387) --- app/controllers/users/omniauth_callbacks_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index e2cc09a42..9a10af588 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -4,6 +4,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController # This method is called by Devise after successful Gov One Login authentication # @return [nil] def openid_connect + redirect_to my_modules_path if user_signed_in? + if params['error'].present? Rails.logger.error("Authentication error: #{params['error']}, #{params['error_description']}") return error_redirect('Params errors present')