New Discussion

Notifications

You’re not receiving notifications from this thread.

User logoff/clear session

1
General

Hello, folks,
rails developer with week experience here :) I tried to make user sign up/log on/log off functionality from scratch, but after clicking on logoff link the session remains active because of browser cookies. My log off realization is in this gitlab snippet: https://gitlab.com/snippets/1987967
Did I missed something? Thanks a lot.

Hey Dainius,

That looks like it would work fine to me. What's happening? You're still logged in after it redirects you?

You're going to want to change that to a DELETE request though, otherwise people can do semi-malicious things and log you out from any website just by making your browser load that URL.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.