You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
The error does not occur in development mode. It only occurs when RAILS_ENV=production. Tested on Ubuntu 16.04 and the macOS Sierra.
Steps to reproduce
Create a new test project:
rails new testproject
cd testproject
Add gem to Gemfile:
gem'omniauth-azure-activedirectory'
Update gems and Gemfile.lock from Gemfile:
bundle
Add omniauth.rb to config/initializers:
Rails.application.config.middleware.useOmniAuth::Builderdoprovider:azure_activedirectory,ENV['AAD_CLIENT_ID'],ENV['AAD_TENANT']# other providers hereend
Run server:
AAD_CLIENT_ID=clientId AAD_TENANT=tenantId RAILS_ENV=production bin/rails server
I was able to successfully work around this issue by requiring the module in my application.rb file:
require'net/http'
Root Cause
I suspect that something runs in Rails development that that requires net/http ahead of time. Nevertheless, do you think that the azure_activedirectory.rb file the omniauth-azure-activedirectory gem should require net/http on its own since it refers to the constant in the fetch_openid_config method on line 169 of that file?
The text was updated successfully, but these errors were encountered:
Summary
When using this gem with Rails 5.1.2 with Ruby 2.4.1, opening path /auth/azureactivedirectory gives this error:
The error does not occur in development mode. It only occurs when RAILS_ENV=production. Tested on Ubuntu 16.04 and the macOS Sierra.
Steps to reproduce
Workaround
I was able to successfully work around this issue by requiring the module in my application.rb file:
Root Cause
I suspect that something runs in Rails development that that requires net/http ahead of time. Nevertheless, do you think that the azure_activedirectory.rb file the omniauth-azure-activedirectory gem should require net/http on its own since it refers to the constant in the fetch_openid_config method on line 169 of that file?
The text was updated successfully, but these errors were encountered: