Skip to content

Two-Factor Authentication

Fluid can add a two-factor authentication step to the withdrawal flow: before the withdrawal is submitted, the user must enter a 6-digit authenticator code, which your platform validates.

Set the two-factor-auth-enabled attribute to "true" based on each player’s 2FA settings:

<fluid-widget two-factor-auth-enabled="true" ...></fluid-widget>

This is a per-player flag — your platform determines whether 2FA appears for each user. The attribute updates reactively when the wallet is closed.

Register a verify2FA handler through the Window Bridge API:

window.fluid.bridge.handleRequest('verify2FA', async ({ code }) => {
const result = await myApi.verify2FA(code);
if (result.valid) {
return { status: 'valid' };
}
if (result.rateLimited) {
return {
status: 'rate_limited',
retryAfterMs: result.retryAfterMs
};
}
return { status: 'invalid' };
});
Status Behaviour
valid Withdrawal proceeds
invalid User prompted to retry
rate_limited User informed of rate limit; retryAfterMs controls when retry is available

Works with the Fluid Cashier only — not for Quick Deposit or Fluid Sweepstakes.