SupeRails

Sdílet
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...

Komentáře • 8

  • @mrpolarbear420
    @mrpolarbear420 Před 20 dny +1

    Good video. Thanks for the resource!

  • @ternggio6563
    @ternggio6563 Před 20 dny +1

    Awesome!

  • @yaroslavbozhak9107
    @yaroslavbozhak9107 Před 20 dny +1

    Thanks for the new video. Great job.

  • @gauravrewaliya3269
    @gauravrewaliya3269 Před 19 dny +1

    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

    • @SupeRails
      @SupeRails  Před 19 dny

      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