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:
Generic | Devise | Authlogic | Auth-0 |
---|---|---|---|
Default inheriting class | devise ... | Authlogic::Session::Base | none |
Obtain current user | current_user | current_user_session or current_user | Thread.new { Current.user }.value |
Two Factor Authentication | One option; there is a decent half hour video on setting it up | an old tutorial, but is still working with authlogic on rails 6.1.7.7 -- verified 10 minutes ago | rails generate authentication --two-factor/tt> 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