Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8614109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:02:49+00:00 2026-06-12T05:02:49+00:00

My User class is :token_authenticatable. I want to override the function Devise::Strategies::TokenAuthenticatable.authenticate! function with

  • 0

My User class is :token_authenticatable. I want to override the function Devise::Strategies::TokenAuthenticatable.authenticate! function with my own function. What is the best way to do that?

Other question is, if I want to override the TokenAuthenticatable class with MyTokenAuthenticatable class to override a couple of functions, what is the best way to do the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:02:51+00:00Added an answer on June 12, 2026 at 5:02 am

    You should create a new Strategy i.e.

    Devise::Strategies::MyTokenAuthenticatable

    It can be a copy of

    Devise::Strategies::TokenAuthenticatable

    that has your necessary changes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I updated my User class, and now whenever someone that had the old version
I want to list all users with their corropsonding user class. Here are simplified
I want to add the current_user.id from devise to another model... question model: class
I have already created a User Model using devise, but I now want to
I want to use token_authenticatable in my application (using Devise). Using this answer I
rails generate devise User I got this=> class DeviseCreateUsers < ActiveRecord::Migration def self.up create_table(:users)
I am using devise omniauth in my rails application, here is the User class
i have a User class with a field for the e-mail-address and a password.
Here is my simple User POCO class: /// <summary> /// The User class represents
Say I've got an array of User : class User : IUserDowngraded { public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.