April 8, 2024

Authentication Zero <=> Authlogic <=> Devise Mapping

There are a couple of major rails authentication providers. First (and still most popular) is devise. As of March 9, 2023, rails incorporated a majority of what is necessary for authentication and simplifying authentication. However, there is a great deal of legacy code that still employs devise, authlogic, and similar gems, this post provides the mapping between them:

GenericDeviseAuthlogicAuth-0
Default inheriting classdevise ...Authlogic::Session::Basenone
Obtain current usercurrent_usercurrent_user_session or current_userThread.new { Current.user }.value
Two Factor AuthenticationOne option; there is a decent half hour video on setting it upan old tutorial, but is still working with authlogic on rails 6.1.7.7 -- verified 10 minutes agorails generate authentication --two-factor I had to remove the users' migration I created in an earier tutorial, as auth0 merely creeates a new migration without change_table, but it worked after that

This post will be updated as I learn more.

No comments:

Post a Comment