How to Use 2FA4PageSafe
2FA4PageSafe lets you add two-factor authentication (2FA) to your PageSafe page, securing your content with a secret key and customizable settings. Protect your pages by requiring a time-based code alongside your regular access controls. You can set expiry times, limit retry attempts, and even style the 2FA form—all from an intuitive interface.
2FA4PageSafe Settings
- Add the Stack: Drag the 2FA4PageSafe stack into your PageSafe project in RapidWeaver.
- Configure Options:
- Show Instructions in Preview: Check this box (default: enabled) to display setup instructions in preview mode.
- Generate Secret Key in Preview: Check this box (default: enabled) to show a button for generating a secret key in preview mode.
- Secret Key: Enter a Base32-encoded, 16-character key (A-Z, 2-7, e.g., ABCD1234EFGH5678). Use the preview generator if enabled, or input your own.
- 2FA Expiry Time: Choose from 1 hour (60 min), 10 hours (600 min), or 24 hours (1440 min, default).
- Tries: Set the number of allowed attempts (1-9, default: 3) to enter the correct 2FA code.
- Background Color: Pick a color for the 2FA form (default: #333333, dark gray).
- Apply to PageSafe: Ensure the stack is linked to your PageSafe content (consult PageSafe docs for specifics).
- Test in Preview: Use RapidWeaver’s preview mode to verify the 2FA setup and generate a key if needed.
Notes
- The secret key must be 16 characters, Base32-encoded (80 bits). Invalid keys will prevent 2FA from working.
- Expiry time determines how long the 2FA session lasts before requiring re-authentication.
- If users exceed the retry limit, they’ll need to restart the authentication process.
- Requires PHP support on your server for full functionality.
Example Setup
- Secret Key: JBSWY3DPEHPK3PXP
- Expiry: 24 hours
- Tries: 3
- Background Color: #333333
Requires: Stacks 5.1+ or StacksPro, Page Safe