How can I sign out a devise user from the Rails console?

前端 未结 7 1847
一个人的身影
一个人的身影 2021-02-06 21:53

My devise users are \"database_authenticatable\" and \"token_authenticatable\". I\'ve tried deleting the \"authentication_token\" field in the database for that user from the co

7条回答
  •  轮回少年
    2021-02-06 21:59

    You may be able to use the helpers that others have mentioned after including the necessary module:

    include Devise::Controllers::SignInOut

    source: Module: Devise::Controllers::SignInOut

    There's also another SO question where someone shares a method that doesn't involve using Devise helpers here.

提交回复
热议问题