TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Best practices for stolen session detection?

2 pointsby stephanos2kabout 11 years ago
We want to secure our service with additional methods of detecting a stolen HTTP session via IP&#x2F;geolocation.<p>Are there any resources to find best practices for implementing such a system?

1 comment

chrisfarmsabout 11 years ago
Detecting the location of the client by IP is not going to be very reliable, it&#x27;s a false sense of security at best. You want to make it impossible to hijack, not detect it when it&#x27;s too late!<p>Even tieing a session to a single source IP is not great (think stealing sessions in a coffee shop behind NAT).<p>Use HTTPS.<p>Sign requests with a MAC (message authentication code).<p>Make sure your tokens expire fairly quickly and you have a method to refresh them.
评论 #7459107 未加载