Actions2
Overview
This node performs login operations for the OKMAN system, specifically handling user authentication via username and password, and optionally verifying OTP (One-Time Password) for two-factor authentication. It is useful for automating login workflows where credentials need to be securely managed and reused within n8n. For example, it can be used to programmatically log into the OKMAN platform, retrieve session cookies, and store credentials for subsequent authenticated API calls.
Use Case Examples
- Automate login to OKMAN with username and password to obtain session cookies.
- Verify OTP after initial login to complete two-factor authentication.
- Store authenticated session credentials in n8n for use in other workflows.
Properties
| Name | Meaning |
|---|---|
| User Agent | The User-Agent string to be sent with HTTP requests, identifying the client. |
| Culture | The culture or language setting for the login request, e.g., 'vi' for Vietnamese. |
| Tenant ID | Optional tenant identifier to specify the tenant context for the login. |
| Device ID (UUID) | Optional unique device identifier used during login and OTP verification. |
| Proxy | Optional proxy server to route HTTP requests through. |
| Raw Cookies (k=v; k2=v2) | Optional raw cookie string to seed the cookie jar with pre-existing cookies. |
| Username | The username for login authentication. |
| Password | The password for login authentication. |
Output
JSON
requiresOtp- Indicates if OTP verification is required after login.deviceId- The device identifier used during login.culture- The culture setting used during login.tenantId- The tenant identifier used during login.userAgent- The User-Agent string used during login.serverData- Response data from the login API containing authentication details.cookiesSeed- Serialized cookies obtained after login, used for session persistence.success- Indicates successful OTP verification and credential creation.credentialId- ID of the stored credential created after successful OTP verification.
Dependencies
- An API key credential for n8n API access to store credentials.
Troubleshooting
- Ensure the Device ID is provided during OTP verification; missing Device ID will cause errors.
- Verify that the username and password are correct to avoid login failures.
- If OTP verification fails, check the OTP code and token validity.
- Network issues or incorrect proxy settings may cause request timeouts or failures.