Sign out a devise session from custom controller action (Rails)

后端 未结 2 1675
囚心锁ツ
囚心锁ツ 2021-01-21 01:20

How to Sign out of a devise session from a custom controller?

Do we have any inbuilt function to do this? just like we have for user_signed_in?

相关标签:
2条回答
  • 2021-01-21 01:57

    Can just clear the sessions:

    reset_session
    
    0 讨论(0)
  • 2021-01-21 02:04

    There is a sign_out method in Devise. You can call it without parameters. See doc.

    0 讨论(0)
提交回复
热议问题