Giter Site home page Giter Site logo

Comments (5)

philnash avatar philnash commented on August 14, 2024

It's been a while since I've been in the code for this project, but after a quick look around I don't believe this plugin touches the sign out process and leaves it all to devise. That resets the session, but leaves cookies in place.

I just tested this in the example app and the remember_device cookie did remain after sign out.

Does your app/devise setup do things with cookies during sign out?

from authy-devise.

GeekOnCoffee avatar GeekOnCoffee commented on August 14, 2024

Interestingly the cookie is there, but the session variable isn't getting set; I think that gives me enough to go on, thanks!

from authy-devise.

philnash avatar philnash commented on August 14, 2024

Remembering the device shouldn't require anything in the session, it's a signed cookie. You can see what it's checking for here:

def require_token?
id = warden.session(resource_name)[:id]
cookie = cookies.signed[:remember_device]
return true if cookie.blank?
# require token for old cookies which just have expiration time and no id
return true if cookie.to_s =~ %r{\A\d+\z}
cookie = JSON.parse(cookie) rescue ""
return cookie.blank? || (Time.now.to_i - cookie['expires'].to_i) > \
resource_class.authy_remember_device.to_i || cookie['id'] != id
end
.

from authy-devise.

GeekOnCoffee avatar GeekOnCoffee commented on August 14, 2024

from authy-devise.

philnash avatar philnash commented on August 14, 2024

Ok, as long as you know what you're looking for now! Let me know if there's anything else I can help with.

from authy-devise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.