I think adding something like thi to application.rb, this may interfere with the problem:
[
config.action_controller.default_url_options,
config.action_mailer.default_url_options,
Rails.application.routes.default_url_options,
Devise::Engine.routes.default_url_options,
Devise::Engine.config.action_controller.default_url_options
].each do |config|
config[:protocol] = "http#{'s' if Rails.env.production}"
end
In addition, you can override the various methods of the Devise controller by subclassing them. Therefore, if you identify the cuplrit method, you can: a) solve the root cause or b) subclass the controller, use a workaround instead.
source
share