Skip to content

Commit

Permalink
Merge branch 'main' into EYCDTK-122-assessment-for-managers-and-leaders
Browse files Browse the repository at this point in the history
  • Loading branch information
martikat authored Nov 15, 2024
2 parents 6e0d2bf + b7e3065 commit 857e3c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/users/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -28,7 +30,6 @@ def openid_connect
gov_user = User.find_or_create_from_gov_one(email: email, gov_one_id: gov_one_id)

delete_session_params
Rails.logger.info("Logging in: #{gov_user}")
sign_in_and_redirect gov_user if gov_user
end

Expand Down

0 comments on commit 857e3c0

Please # to comment.