0

In our system, we have a separate solution for authentication, and we do not want to use the devise's password verification functionality.

Other than password verification, we want to rely on the devise for users management.

Can someone help us to achieve that?

Eyeslandic
  • 14,553
  • 13
  • 41
  • 54
Anand Padiya
  • 143
  • 8
  • 1
    From the docs: _"Devise is a flexible **authentication** solution for Rails"_. If you do not want to use Devise for authentication then why use Devise at all? Can you please elaborate on your use case and give an example of what feature of Devise you want to use and how? – spickermann Apr 08 '22 at 10:29
  • @spickermann Actually, we are using an open-source platform that is developed using ruby on rails. We want to override the user verification functionality by doing minimal changes to the platform. – Anand Padiya Apr 08 '22 at 10:40
  • 2
    All features of Devise are built around authentication, password handling, and verifying accounts. If you are doing user authentication without Devise outside of your application then IMO you should remove Devise completely because I don't see any feature of Devise that you could benefit from. Especially because user management, authorization, or role management are not provided by Devise. – spickermann Apr 08 '22 at 10:54
  • @spickermann Devise can do a lot more then password based authentication. It is built on top of Warden so you it can do LDAP, OAuth , Token based or any other strategy you can dream up. But where you're right is that you won't actually get much value out of it if you're not actually using the views and controllers for signups and registrations (etc). – max Apr 08 '22 at 13:00
  • It should also be noted that even if you're using an existing external authentication provider like for example Auth0 you still need an authentication system in your Rails application which can keep track of the current user and handle denying access to endpoints that should require authentication. Warden is a really good architecture for this if you get you head wrapped around the the whole authentication-as-middleware concept. – max Apr 08 '22 at 13:07
  • @max Using Warden might be a good idea depending on how the OP's external system works but Devise? – spickermann Apr 08 '22 at 13:12
  • @spickermann yeah I would admit that its a bit of a swiss army bulldozer and quite heavy if you're not using large parts of it but even if you're just using the helpers and warden integeration its still better then 99% of the stuff I have seen when people reinvent the wheel. – max Apr 08 '22 at 13:19

0 Answers0