Add Follow Me Security to your site
Your users' logins then only work from places they've approved. $19/month per site; free for your users.
How it works
- Register your site. Sites you add get a one-line connection key, and the downloads below come with it already inside.
- Add a Link with Follow Me Security button to your account settings. Users approve the link on our site and come back with a code you swap for a link token.
- At login, after the password is correct and before your own 2FA, ask us whether their IP is allowed. Refuse the login if not.
WordPress
On your site's page, click WordPress plugin (your key is inside). Then in WordPress: Plugins → Add New → Upload Plugin → Activate. Each user links from Users → Profile.
Checks wp-login.php, XML-RPC and Application Passwords. Runs after the password check, so your 2FA plugin keeps working. More about the WordPress plugin
PHP
Fastest: on your site's page, click PHP drop-in folder (your key is inside), upload fms-connect to your web root, and add two lines:
require $_SERVER['DOCUMENT_ROOT'] . '/fms-connect/fms-connect.php';
if (($ok = fms_login_check($userId)) !== true) { /* stop the login, show $ok */ } // at login
echo fms_link_button($userId, $username); // in account settings
Full control: use the one-file client. Download FollowMeSecurity.php
$fms = FollowMeSecurity::fromKey(getenv('FMS_KEY'));
// settings.php: the button
$_SESSION['fms_state'] = FollowMeSecurity::newState();
$url = $fms->linkUrl('https://example.com/fms-callback.php', $_SESSION['fms_state'], $user['username']);
// fms-callback.php
if (!hash_equals($_SESSION['fms_state'] ?? '', $_GET['state'] ?? '')) exit('Bad request');
if (!empty($_GET['code'])) save_user_field($user['id'], 'fms_link_token', $fms->exchange($_GET['code'])['link_token']);
// login, after password_verify() succeeds
$r = $fms->check($user['fms_link_token'], $_SERVER['REMOTE_ADDR']);
if (!$r['linked']) save_user_field($user['id'], 'fms_link_token', null);
elseif (!$r['allowed']) exit('Login not allowed from this location.');
Node.js
Zero dependencies, Node 18+, TypeScript types included. Download the Node.js package
const FollowMeSecurity = require('followmesecurity');
const fms = FollowMeSecurity.fromKey(process.env.FMS_KEY);
const r = await fms.check(user.fmsLinkToken, req.socket.remoteAddress);
if (!r.linked) clearToken(user);
else if (!r.allowed) return res.status(403).send('Login not allowed from this location.');
The README in the download has a complete Express example, including the link and callback routes. More about Node.js
Python
Standard library only, Python 3.8+. Download the Python package
from followmesecurity import FollowMeSecurity fms = FollowMeSecurity.from_key(os.environ["FMS_KEY"]) r = fms.check(user.fms_link_token, request.remote_addr) if not r["linked"]: clear_token(user) elif not r["allowed"]: abort(403)
The README has full Flask and Django examples. More about Python
Which IP to send
Always the real connection address: $_SERVER['REMOTE_ADDR'], req.socket.remoteAddress, request.remote_addr. Only use a forwarded header if your own proxy (e.g. Cloudflare) sets it; visitors can fake X-Forwarded-For.
If we can't be reached within 3 seconds, every client follows your site's outage setting (default: deny) and never throws.
API reference (any language)
Base URL https://followmesecurity.com/api/v1. JSON in and out. Your connection key is fms1_ + base64url JSON {"u": base URL, "s": site ID, "k": secret}. Every call except /ping carries:
| Header | Value |
|---|---|
X-FMS-Site | Your site ID |
X-FMS-Timestamp | Current Unix time (within 5 minutes) |
X-FMS-Signature | Hex HMAC-SHA256 of timestamp.METHOD.path.body with your secret, e.g. 1763650000.POST./api/v1/check.{"link_token":"...","ip":"203.0.113.9"} |
| Endpoint | Body | Returns |
|---|---|---|
POST /link/exchange | {"code"} | {"link_token","email"} |
POST /check | {"link_token","ip"} | {"result":"allow|deny","reason","linked","fallback_allow"} |
POST /unlink | {"link_token"} | {"ok":true} |
GET /site/allowlist | {"ips":[{"label","type"}],"block_user_ips","fallback_allow"} (names only: IPs are stored as one-way codes) | |
GET /ping | {"ok":true,"time"} (no signature) |
Link flow: send the user to https://followmesecurity.com/link.php?site=SITE_ID&redirect_uri=...&state=...&ref=USERNAME; they return to redirect_uri?code=...&state=... (or ?error=access_denied).
Reasons: follow_ip, user_list, site_list, not_followed, no_follow_ip, site_inactive, not_linked.