SupeRails
Vložit
- čas přidán 17. 04. 2024
- In some cases to enhance security of your application you will want to allow users to see all the devices/browsers they are logged in with. You would also provided a button to sign out of a device/browser.
Here's how you can do it!
Episode source code: github.com/corsego/165-securi...
Based on this blogpost: blog.corsego.com/secutiry-man...
Good video. Thanks for the resource!
Awesome!
Thanks for the new video. Great job.
Thank for watching Yaro!
Great video👍😁
But i am thinking the best approach to save last time of that device is used
So it become easy to delete too old session like what'sapp , telegram etc
As there are lots of simple approach , but i want the effective apprach , as its not good to update db for every request
Suggestions from anyone is appreciable
With my approach we read the db with each request to check if this session is valid (has not been logged out remotely);
Writing to updated_at on each request is not perfect indeed. Alternatively you might have to do some Redis shenanigans 🤪
It's like here's an approach to see "users online" with timestamps: blog.corsego.com/set-user-status-online,
and here's a Redis approach: blog.corsego.com/action-cable-broadcast-users-online