diff --git a/changelogs/unreleased/sh-fix-oauth2-callback-caps.yml b/changelogs/unreleased/sh-fix-oauth2-callback-caps.yml new file mode 100644 index 0000000000000000000000000000000000000000..8d17900cb79934cc2a42dee234dfe797ffcafbb4 --- /dev/null +++ b/changelogs/unreleased/sh-fix-oauth2-callback-caps.yml @@ -0,0 +1,5 @@ +--- +title: Downcase aliased OAuth2 callback providers +merge_request: 24877 +author: +type: fixed diff --git a/config/routes/import.rb b/config/routes/import.rb index 69df82611f29c1ea7873cae7804106eeea84c952..da5c31d0062492381a0e88ddda3b3ed5da2af178 100644 --- a/config/routes/import.rb +++ b/config/routes/import.rb @@ -1,7 +1,7 @@ # Alias import callbacks under the /users/auth endpoint so that # the OAuth2 callback URL can be restricted under http://example.com/users/auth # instead of http://example.com. -Devise.omniauth_providers.each do |provider| +Devise.omniauth_providers.map(&:downcase).each do |provider| next if provider == 'ldapmain' get "/users/auth/-/import/#{provider}/callback", to: "import/#{provider}#callback", as: "users_import_#{provider}_callback"