Actions6
Login Only
AI-generatedSummary
Authenticate to a website by performing a login request, managing and storing session cookies automatically for subsequent authenticated requests.
Inputs
- Enable CSRF Handling — Enable automatic fetching and inclusion of CSRF tokens during login.
- CSRF Token Selector — Specify a custom CSS selector or meta name to locate the CSRF token on the login page.
- CSRF Token Field Name — Define the form field name to include the CSRF token in the login request (default is '_token').
- Request Timeout — Set the maximum request timeout in seconds for HTTP requests during login (default is 30 seconds).
Output shape
A JSON object representing the authenticated session's cookies and metadata about stored cookies.
The output includes an array of cookies in a structured format with attributes such as domain, name, value, path, httpOnly, secure, sameSite, expirationDate, and session status. Successful login results in these session cookies stored for later authenticated requests.
Examples
Example 1: Logging into a website with CSRF protection
Enable CSRF Handling, provide the CSRF Token Selector to locate the CSRF token in the login page HTML, and specify the CSRF Token Field Name if the default '_token' does not apply. Set credentials with login URL, username, password, and optionally additional fields. The node retrieves the login page, extracts the CSRF token, performs the login by posting credentials and token, then stores the session cookies automatically.