Authentication
Testing behind a login? RoostGPT handles the full spectrum of authentication scenarios — from embedded login forms to Google OAuth and Okta SAML, including multi-factor authentication.
Supported Login Types
| Login Type | Configuration | Description |
|---|---|---|
| Embedded login | LOGIN_TYPE=embedded_login | Standard username/password forms — works with any form layout |
| Google OAuth | LOGIN_TYPE=google | Google OAuth login flow |
| Okta SAML | LOGIN_TYPE=okta | Okta-based SAML authentication |
| Custom script | PLAYWRIGHT_LOGIN_SCRIPT=path | Your own Playwright login script for non-standard auth |
| No auth | LOGIN_TYPE=none | Application does not require authentication |
Configuration
Basic Login
# In your .env file
LOGIN_TYPE=embedded_login
UI_SITE_USERNAME=testuser@example.com
UI_SITE_PASSWORD=your-test-password
OTP / Multi-Factor Authentication
Built-in support for time-based one-time passwords (TOTP):
UI_OTP_SECRET=YOUR_BASE32_TOTP_SECRET
UI_OTP_DIGITS=6
UI_OTP_ALGORITHM=sha1
UI_OTP_PERIOD=30
For non-standard OTP implementations, provide a custom script:
UI_OTP_SCRIPT_PATH=/path/to/otp-script.js
UI_OTP_SCRIPT_COMMAND=node
:::note Credential Security Passwords and OTP secrets are stored securely and never appear in plaintext in generated test files or reports. :::
Session Reuse
Authenticated sessions are automatically preserved and reused across tests, dramatically reducing execution time. RoostGPT logs in once, saves the session state, and restores it for subsequent tests — re-running the login flow only when the session has expired.
Dedicated Login Tests
RoostGPT automatically generates login test scenarios that verify your authentication flow itself — including successful login, redirect behavior, and session persistence. These are generated separately from workflow tests and run first to establish the authenticated session.
Next Steps
- Autonomous Discovery — How authenticated pages are discovered
- Self-Healing & Learning — How login flow changes are handled
- Configuration Reference — All authentication-related variables