简体   繁体   中英

Disable sessions for devise

I am using Rails 3 and devise. I am building a restful api and I want devise to go through the custom warden strategy that I wrote for each request. But what I am seeing is that it authenticates a user and then uses the session to authenticate subsequent requests.

How can I disable the session entirely? Or get Devise to fully authenticate each time? Or is it just a matter of implementing something in my custom strategy?

I'm pretty sure adding this into your strategy would do what you want:

Warden::Manager.serialize_into_session {}
Warden::Manager.serialize_from_session {}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM