
Research
/Security News
PolinRider Spreads Through Compromised GitHub Accounts and Packagist
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.
@workos/radar-signals
Advanced tools
Collect browser signals for WorkOS Radar fraud and bot detection.
@workos/radar-signals runs in the browser, loads a signal collection script from the WorkOS CDN, and returns a correlation token you pass with your authentication calls. WorkOS Radar uses these signals server-side to evaluate risk.
npm install @workos/radar-signals
Wrap your app (or auth subtree) in RadarSignalsProvider. Signal collection starts automatically on mount. You can find your client ID in the WorkOS Dashboard under Applications.
import { RadarSignalsProvider } from '@workos/radar-signals/react';
function App() {
return (
<RadarSignalsProvider clientId="client_01ABC...">
<LoginForm />
</RadarSignalsProvider>
);
}
Then call getToken() from any child component when you need the correlation token:
import { useRadarToken } from '@workos/radar-signals/react';
function LoginForm() {
const { getToken, tokenReady } = useRadarToken();
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
const token = await getToken();
await fetch('/api/auth/login', {
method: 'POST',
body: JSON.stringify({ radar_token: token }),
});
};
return (
<form onSubmit={handleSubmit}>
{/* ... */}
<button type="submit" disabled={!tokenReady}>Log in</button>
</form>
);
}
getToken() returns the correlation token — if collection is still in-flight, it waits for completionThe library is fail-open: getToken() always returns a value, even if the CDN script fails to load. Server-side Radar handles missing signals gracefully.
Requires React 18 or later. Import from @workos/radar-signals/react.
<RadarSignalsProvider>Initializes Radar and provides the token to descendant components via context.
| Prop | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your WorkOS client ID (publishable, safe for browser use). Find this in the WorkOS Dashboard under Applications. |
apiUrl | string | No | Override the API base URL (defaults to https://api.workos.com) |
useRadarToken()Returns { getToken, tokenReady } from the nearest RadarSignalsProvider.
getToken() — returns the token after collection completes (async)tokenReady — true once a real token is available; useful for disabling submit buttons until signals are collecteduseRadarSignals(options)Standalone hook that creates its own Radar instance — no provider needed. Accepts the same options as RadarSignalsProvider. Returns { getToken, tokenReady }.
import { useRadarSignals } from '@workos/radar-signals/react';
function LoginForm() {
const { getToken, tokenReady } = useRadarSignals({
clientId: 'client_01ABC...',
});
// ...
}
If you're not using React, the WorkOSRadar class provides the same functionality.
import { WorkOSRadar } from '@workos/radar-signals';
const radar = WorkOSRadar.init({ clientId: 'client_01ABC...' });
const token = await radar.getToken();
WorkOSRadar.init(options)Creates a new Radar instance and loads the CDN collectors script.
| Option | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | Your WorkOS client ID (publishable, safe for browser use). Find this in the WorkOS Dashboard under Applications. |
apiUrl | string | No | Override the API base URL (defaults to https://api.workos.com) |
radar.getToken()Returns the correlation token after signals have been collected and submitted. If the CDN script is still loading, the promise resolves once complete.
radar.tokenReadyBoolean flag that becomes true once a real token is available. Useful for checking whether collection has completed without awaiting.
For environments without a bundler, load the IIFE build via a <script> tag.
<script src="https://unpkg.com/@workos/radar-signals/dist/workos-radar-signals.global.js"></script>
<script>
var radar = WorkOSRadar.init({ clientId: 'client_01ABC...' });
radar.getToken().then(function (token) {
// pass token with your auth request
});
</script>
MIT
FAQs
Browser signals collector for WorkOS Radar
The npm package @workos/radar-signals receives a total of 13,602 weekly downloads. As such, @workos/radar-signals popularity was classified as popular.
We found that @workos/radar-signals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.