16 lines
403 B
Ruby
16 lines
403 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Users
|
|
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|
def keycloakopenid
|
|
Rails.logger.debug(request.env['omniauth.auth'])
|
|
@user = User.find_or_create_from_auth_hash(request.env['omniauth.auth'])
|
|
sign_in_and_redirect @user, event: :authentication
|
|
end
|
|
|
|
def failure
|
|
redirect_to root_path
|
|
end
|
|
end
|
|
end
|