mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 07:41:53 +09:00
Refactor authentication and session management
- Removed old llm_login and session scripts, replacing them with a new structure for handling SSO login and session management. - Introduced a new prompt system for collecting SSO redirect URLs, ensuring compliance with security protocols. - Implemented a robust backend notification system for tracking scan initiation. - Enhanced browser profile configuration and resource management for improved session handling. - Added utility functions for environment variable checks and logging. - Updated the overall architecture to improve maintainability and readability.
This commit is contained in:
parent
2d8a7d5cfb
commit
b68425f523
16 changed files with 251 additions and 232 deletions
29
lib/utils/browser_use/__init__.py
Normal file
29
lib/utils/browser_use/__init__.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from func import *
|
||||
import clean_resources as clean_resources_func
|
||||
|
||||
# Initialize configuration
|
||||
proxy_url = setup_proxy()
|
||||
storage_state_path = setup_storage_state()
|
||||
|
||||
# Create browser profile
|
||||
profile = BrowserProfile(
|
||||
# Security settings
|
||||
disable_security=True,
|
||||
stealth=True,
|
||||
|
||||
# Display settings
|
||||
headless=False,
|
||||
device_scale_factor=1,
|
||||
window_size={"width": 1600, "height": 900},
|
||||
viewport={"width": 1600, "height": 900},
|
||||
|
||||
# Data persistence
|
||||
user_data_dir=None,
|
||||
storage_state=storage_state_path,
|
||||
|
||||
# Network settings
|
||||
proxy={"server": proxy_url} if proxy_url else None,
|
||||
|
||||
# Additional arguments
|
||||
args=get_browser_args(),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue