#165

Поделиться
HTML-код
  • Опубликовано: 17 апр 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...

Комментарии • 8

  • @mrpolarbear420
    @mrpolarbear420 Месяц назад +1

    Good video. Thanks for the resource!

  • @yaroslavbozhak9107
    @yaroslavbozhak9107 Месяц назад +1

    Thanks for the new video. Great job.

    • @SupeRails
      @SupeRails  Месяц назад

      Thank for watching Yaro!

  • @ternggio6563
    @ternggio6563 Месяц назад +1

    Awesome!

  • @gauravrewaliya3269
    @gauravrewaliya3269 Месяц назад +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  Месяц назад

      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