support magic link login (#3702)

This commit is contained in:
LawyZheng
2025-10-14 16:24:14 +08:00
committed by GitHub
parent eda2dcffa4
commit dc832ea6db
19 changed files with 443 additions and 30 deletions

View File

@@ -39,7 +39,8 @@ Reply in JSON format with the following keys:
}],{% if verification_code_check %}
"verification_code_reasoning": str, // Let's think step by step. Describe what you see and think if there is somewhere on the current page where you must enter the verification code now for login or any verification step. Explain why you believe a verification code needs to be entered somewhere or not. Do not imagine any place to enter the code if the code has not been sent yet.
"place_to_enter_verification_code": bool, // Whether there is a place on the current page to enter the verification code now.
"should_enter_verification_code": bool // Whether the user should proceed to enter the verification code {% endif %}
"should_enter_verification_code": bool, // Whether the user should proceed to enter the verification code.
"should_verify_by_magic_link": bool // Whether the page instructs the user to check their email for a magic link to verify the login.{% endif %}
}
Consider the action history from the last step and the screenshot together, if actions from the last step don't yield positive impact, try other actions or other action combinations.

View File

@@ -0,0 +1,20 @@
You receive either an email or a text message containing an OTP(like TOTP, Magic Link) to verify the login. Your job is to parse the content, identify the OTP type and value. There should be only one OTP type and one OTP value in the content. The value must be from the content
You should follow the rules below to identify the OTP type and value:
- If it's a Magic Link login, the value is usually a link which must be a valid HTTP or HTTPS URL.
- If it's a TOTP login, The most common value is a code which is a series of digits, although sometimes it may contain letters.
MAKE SURE YOU OUTPUT VALID JSON. No text before or after JSON, no trailing commas, no comments (//), no unnecessary quotes, etc.
Reply in the following JSON format:
{
"reasoning": str, // How you figure out what the OTP type and value is or why the OTP type and value is missing. Be precise here to explain the data source and the context that makes you believe where the correct OTP type and value is
"otp_type": str, // the type of OTP. It can be "magic_link" or "totp"
"otp_value_found": bool, // true if the OTP value is found. false if the OTP value is not found
"otp_value": str, // the OTP value. If you cannot identify any OTP value, do not come up with a OTP value and return null
}
Received Content containing OTP:
```
{{ content }}
```