From 5ea5f75fc708fba93f3a1ac3781fa011510ed116 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 27 Feb 2024 16:06:09 +0100 Subject: [PATCH] clean up --- app/controllers/omniauth_callbacks_controller.rb | 3 +-- app/helpers/auth_helper.rb | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index 6bcd47d9b..e61702cd2 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -1,7 +1,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController def openid_connect - @user = Person.from_omniauth(request.env['omniauth.auth']) - @user.save + @user = Person.from_omniauth(request.env['omniauth.auth']).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 eb50864c2..dd51dd5a0 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -1,4 +1,6 @@ -module AuthHelper +# frozen_string_literal: true + +module Helper def session_path(_scope) new_person_session_path end