- Changed the key in sensitive_data from '2fa_code' to 'bu_2fa_code' for improved clarity.
- Updated user instructions to align with the new key terminology.
These modifications enhance the consistency and clarity of the 2FA implementation.
- Changed the key in sensitive_data from 'otp_secret' to '2fa_code' for consistency across files.
- Updated instructions in the 2FA example to reflect the new key and improve clarity on user input.
These changes enhance the clarity and maintainability of the 2FA implementation.
- Removed unnecessary logging setup to streamline the code.
- Simplified the definition of sensitive_data by eliminating type annotations.
- Updated comments for better guidance on using the 2FA example.
These changes improve the readability and maintainability of the 2FA implementation.
- Updated sensitive_data definitions to remove type annotations for clarity.
- Simplified the structure of sensitive_data in multiple files, ensuring consistency in credential representation.
- Enhanced comments to guide users on the proper use of sensitive data in the context of 2FA and domain-specific credentials.
These changes improve the readability and maintainability of the code while ensuring secure handling of sensitive information.
This commit introduces a new script, `2fa.py`, which implements a custom action to retrieve 2FA/MFA codes using the `pyotp` library. The action extracts the OTP secret key from an environment variable and generates a time-based one-time password. Additionally, the script includes an example task demonstrating how to use the 2FA action within an agent-based workflow.
### Key Changes:
- New file `examples/custom-functions/2fa.py` added.
- Custom action `get_otp_2fa` to generate 2FA codes.
- Example usage of the action in an asynchronous context.
This addition enhances the functionality of the agent system by providing secure 2FA code retrieval capabilities.