Skip to content
AlexVonB edited this page Jul 23, 2021 · 1 revision

Save this diff to a file (e.g. pam.diff) and git apply pam.diff it in the Gitlab root folder.

diff --git a/Gemfile b/Gemfile
index 309e31c1dd0..c4d3fce9817 100644
--- a/Gemfile
+++ b/Gemfile
@@ -38,6 +38,7 @@ gem 'omniauth-github', '~> 1.4'
 gem 'omniauth-gitlab', '~> 1.0.2'
 gem 'omniauth-google-oauth2', '~> 0.6.0'
 gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos
+gem 'omniauth-pam', :git => 'https://github.com/ekut-es/omniauth-pam', :branch => 'ekut-gitlab'
 gem 'omniauth-oauth2-generic', '~> 0.2.2'
 gem 'omniauth-saml', '~> 1.10'
 gem 'omniauth-shibboleth', '~> 1.3.0'
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index c9791703413..b1271038b23 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -9,7 +9,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController

   after_action :verify_known_sign_in

-  protect_from_forgery except: [:kerberos, :saml, :cas3, :failure], with: :exception, prepend: true
+  protect_from_forgery except: [:PAM, :kerberos, :saml, :cas3, :failure], with: :exception, prepend: true

   feature_category :authentication_and_authorization
Clone this wiki locally