From e2bbafe37730fe68b569548abb5704c00cd42125 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 27 Feb 2024 16:15:55 +0100 Subject: [PATCH] fix controller --- app/controllers/omniauth_callbacks_controller.rb | 3 ++- app/helpers/auth_helper.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index e61702cd2..6bcd47d9b 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -1,6 +1,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController def openid_connect - @user = Person.from_omniauth(request.env['omniauth.auth']).save + @user = Person.from_omniauth(request.env['omniauth.auth']) + @user.save sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated set_flash_message(:notice, :success, kind: 'Keycloak') if is_navigational_format? end diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index dd51dd5a0..068a83237 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Helper +module AuthHelper def session_path(_scope) new_person_session_path end