Human Auth: OAuth / Login
Use this when an app requires the user to log in with their account credentials.
When to Trigger
- App shows a login screen with username/email and password fields.
- App redirects to a social sign-in page (Google, Apple, Facebook, etc.).
- App requires account authentication to proceed.
How to Call
request_human_auth(
capability: "oauth",
instruction: "Please provide your login credentials for [app/service name].",
uiTemplate: {
fields: [
{ id: "username", label: "Username / Email", type: "text", required: true, autocomplete: "username" },
{ id: "password", label: "Password", type: "password", required: true, autocomplete: "current-password" }
],
artifactKind: "credentials",
requireArtifactOnApprove: true,
title: "Account Login Required",
summary: "Enter your credentials to log in."
}
)
After You Receive the Artifact
Read the artifact: read(<artifact_path>) to get username and password.
Check the current screen. The login form may still be visible, or the app may have changed state during the wait.
If the login form is still visible:
- Tap the username/email field →
type_text(<username>)
- Tap the password field →
type_text(<password>)
- Tap Sign In / Log In / Submit
If the screen changed: press keyevent KEYCODE_BACK to return to the login form, or re-navigate to it.
Delete the artifact immediately (contains plaintext credentials):
exec("rm <artifact_path>")
Handle post-login flows (2FA prompt, terms acceptance, etc.) as needed.
Multi-Step Login (e.g., Google)
Some services split login into two pages (email first, then password). If the login screen only shows one field:
- Type the visible field's value, tap Next.
- On the next page, call
request_human_auth again for the password if needed, or use the already-received credentials.
Tips
- If the app has "Sign in with Google/Apple" button, consider Remote Takeover so the human can complete the OAuth flow directly.
- Never type credentials into the wrong field. Always verify the field label before typing.
1---2name: human-auth-oauth3description: Handle account login credential delegation from Human Phone. Covers username/password entry, social sign-in walls, and multi-step login flows.4---56# Human Auth: OAuth / Login78Use this when an app requires the user to log in with their account credentials.910## When to Trigger1112- App shows a login screen with username/email and password fields.13- App redirects to a social sign-in page (Google, Apple, Facebook, etc.).14- App requires account authentication to proceed.1516## How to Call1718```19request_human_auth(20 capability: "oauth",21 instruction: "Please provide your login credentials for [app/service name].",22 uiTemplate: {23 fields: [24 { id: "username", label: "Username / Email", type: "text", required: true, autocomplete: "username" },25 { id: "password", label: "Password", type: "password", required: true, autocomplete: "current-password" }26 ],27 artifactKind: "credentials",28 requireArtifactOnApprove: true,29 title: "Account Login Required",30 summary: "Enter your credentials to log in."31 }32)33```3435## After You Receive the Artifact36371. **Read the artifact:** `read(<artifact_path>)` to get `username` and `password`.38392. **Check the current screen.** The login form may still be visible, or the app may have changed state during the wait.40413. **If the login form is still visible:**42 - Tap the username/email field → `type_text(<username>)`43 - Tap the password field → `type_text(<password>)`44 - Tap Sign In / Log In / Submit45464. **If the screen changed:** press `keyevent KEYCODE_BACK` to return to the login form, or re-navigate to it.47485. **Delete the artifact immediately** (contains plaintext credentials):49 ```50 exec("rm <artifact_path>")51 ```52536. Handle post-login flows (2FA prompt, terms acceptance, etc.) as needed.5455## Multi-Step Login (e.g., Google)5657Some services split login into two pages (email first, then password). If the login screen only shows one field:58- Type the visible field's value, tap Next.59- On the next page, call `request_human_auth` again for the password if needed, or use the already-received credentials.6061## Tips6263- If the app has "Sign in with Google/Apple" button, consider Remote Takeover so the human can complete the OAuth flow directly.64- Never type credentials into the wrong field. Always verify the field label before typing.