nbudin / devise_cas_authenticatable

CAS authentication support for Devise
MIT License
285 stars 117 forks source link

rubycas-client appears to be deprecated and does not support Rails 6 #151

Closed ClearCarbon closed 3 years ago

ClearCarbon commented 5 years ago

Hi, The rubycas-client hasn't been updated in around 3 years and has a message on its readme asking for a new maintainer. We currently get the following error when using Rails 6 and devise_cas_authenticatable

The CasProxyCallbackController in rubycas-client is causing the following deprecation warning in Rails 6:

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ActionText::ContentHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

There are more details about the issue here - https://github.com/rails/rails/issues/36546 however it appears to be caused by referring to ActionController::Base before the initializers have run.

In the longer term do you have any plans to maintain or replace rubycas-client gem as a dependency?

nbudin commented 5 years ago

Oh man, I hadn't run into this yet. (I've personally begun the process of migrating all my apps away from CAS and towards OpenID Connect for authentication.)

From the rubycas-client readme, it seems as if the only currently-maintained CAS client for Ruby is rack-cas. If someone is interested in making a PR to migrate to that, I would be very much in favor of it, but I am probably not going to have the time to do it myself.

(Incidentally, if anyone is interested in taking over maintainership of this gem, I would also be very much in favor of that.)

jacobwalkr commented 3 years ago

Thanks for identifying this one, team. I've just hit the problem in a new Rails 6.1 project and although it doesn't seem to be a huge issue, it would be nice to fix. I'll take a look but I have no idea what I'm doing 😁

nbudin commented 3 years ago

Version 2.0.0.alpha1 of this gem is now out, and ports the backend to rack-cas rather than rubycas-client. This does require some configuration changes to upgrade to it, please see the README for details!