One call after authenticate()
fms = FollowMeSecurity.from_key(os.environ["FMS_KEY"])\n\nr = fms.check(user.profile.fms_link_token, request.META["REMOTE_ADDR"])\nif r["linked"] and not r["allowed"]:\n return HttpResponseForbidden("Login not allowed from this location.")The followmesecurity package uses only the standard library and works on Python 3.8+. check() never raises; if our service is unreachable it follows your outage setting (deny by default).
Linking accounts
Two small views in account settings: one redirects to link_url(), the other calls exchange() with the returned code and saves the token on the user. The README has full Flask and Django examples.
Built for real-world attacks
Credential stuffing, password guessing and real-time phishing all log in from the attacker's own infrastructure. With Follow Me Security, those logins are refused unless they come from the user's Follow Me IP, their fixed IPs, or IPs you allow for your whole app.
How Follow Me Security works
- Your site links up. Install the WordPress plugin, add the PHP drop-in, or use our Node.js or Python package. Any other language can call the API. Users click "Link with Follow Me Security" in their account settings.
- Users press Follow Me. From their phone, wherever they are. That network becomes their approved place to sign in.
- Every login is checked. After the password is right, your site asks us if the IP is approved. If not, the login is refused, before your own 2FA even runs.
Always an extra layer: passwords and two-factor sign-in still apply. IPs are stored only as keyed one-way hashes.
Frequently asked questions
Does it work with Django's built-in auth?
Yes. Call it after authenticate() and before login(), or in a custom authentication backend.
What about FastAPI or other frameworks?
It's a plain synchronous client, so it works anywhere. In async apps, run check() in a thread pool.
Is my users' IP data stored?
Only as keyed one-way hashes on our side, never as readable IP addresses.