mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 14:01:52 +09:00
microsoft 추가
This commit is contained in:
parent
1ddc3c41bc
commit
ce70191d49
4 changed files with 57 additions and 55 deletions
53
lib/llm/prompt/Microsoft.py
Normal file
53
lib/llm/prompt/Microsoft.py
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Extended planner prompt
|
||||
extend_planner_system_message = f"""
|
||||
|
||||
# 목적 : Microsoft OAuth 로그인
|
||||
|
||||
## ✅ Step 1 : Step 3에서
|
||||
|
||||
만약에 Microsoft에 로그인 되어 있는 계정(oauth test)가 없을 경우
|
||||
- Microosoft.sensitive.json에서 sign in with your username(email) x_username and password is x_password
|
||||
- 반드시 이 과정에서 username을 먼저 입력하고 다음 과정에서 암호 사용을 누른 후 password를 입력해야 한다.
|
||||
|
||||
|
||||
쿠키 삭제 방법:
|
||||
chrome://settings/clearBrowserData에 들어가서 삭제해주세요.
|
||||
|
||||
🛑 절대 아래와 같이 해석하지 말 것:
|
||||
- ❌ 버튼 클릭 후 페이지 로딩만 기다리고 돌아가기
|
||||
- ❌ URL 저장 없이 go_back() 호출
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
### ✨ 추가 안전 장치: "뒤로가기(go_back) 호출 조건" 제한
|
||||
|
||||
```text
|
||||
🛑 뒤로가기(go_back)은 다음 조건이 모두 충족될 때만 사용 => 다만 로그인 실패 시, 뒤로가기 수행:
|
||||
- ✅ 로그인 흐름이 완료됨 (예: redirect back to app, or callback URL)
|
||||
- ✅ 현재 리디렉션 URL이 수집됨
|
||||
- ✅ 결과에 저장 후 다음 버튼 탐색을 위해 복귀 필요할 때
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚫 Step 2: 버튼 없음 또는 예외 발생 시
|
||||
|
||||
* 유효한 SSO 버튼이 **전혀 없을 경우**
|
||||
* 예외, 오류 등 발생 시
|
||||
|
||||
-> 즉시 중단
|
||||
|
||||
---
|
||||
|
||||
## 📎 중요 규칙 요약
|
||||
|
||||
* 🔁 단계는 반드시 순서대로 진행
|
||||
* 🔐 로그인은 쿠키/세션으로 유지된 상태에서 수행
|
||||
* 👀 직접 OAuth Providor ID/PW를 입력하여도 됨 가지고 있다면
|
||||
* ⛔ 추측한 URL은 접속하지 않음
|
||||
|
||||
---
|
||||
"""
|
||||
|
|
@ -12,6 +12,10 @@ def get_prompt(type:str) -> str:
|
|||
if type.lower() == "auth":
|
||||
from lib.llm.prompt.auth_list import extract_oauth_list_prompt
|
||||
return extract_oauth_list_prompt
|
||||
|
||||
elif type.lower() == "microsoft" and type.lower() == "microsoftonline":
|
||||
from lib.llm.prompt.Microsoft import extend_planner_system_message
|
||||
return extend_planner_system_message
|
||||
|
||||
else:
|
||||
from lib.llm.prompt.fallback import extend_planner_system_message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue