chromeauth

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialsRejected = errors.New("Chrome OAuth 续签材料失效")

ErrCredentialsRejected 表示上游已拒绝保存的 Chrome 续签材料

Functions

func DefaultChromeRoot

func DefaultChromeRoot() (string, error)

DefaultChromeRoot 返回稳定版 Chrome User Data 目录

func Refresh

func Refresh(ctx context.Context, material aistudio.ChromeOAuthMaterial, proxy string) ([]aistudio.StateCookie, error)

Refresh 使用保存的设备绑定材料重新签发 Google Cookie

Types

type Account

type Account struct {
	ID          string `json:"id"`
	GaiaID      string `json:"-"`
	Profile     string `json:"profile"`
	DisplayName string `json:"display_name"`
	Email       string `json:"email"`
	Locale      string `json:"locale"`
	Importable  bool   `json:"importable"`
}

Account 描述本机 Chrome 中可发现的 Google 账号

func Discover

func Discover(chromeRoot string) ([]Account, error)

Discover 只读列出本机 Chrome Google 账号

type ImportOptions

type ImportOptions struct {
	AccountIDs []string
	ChromeRoot string
	Proxy      string
	Profiles   []string
	Emails     []string
}

ImportOptions 保存 Chrome 批量导入参数

type ImportResult

type ImportResult struct {
	Profile     string
	DisplayName string
	Email       string
	Locale      string
	CookieCount int
	State       aistudio.StorageState
}

ImportResult 返回一个已验证前的账号状态

func Import

func Import(ctx context.Context, options ImportOptions) ([]ImportResult, error)

Import 通过设备绑定 OAuth 材料生成 Playwright storage state

type Verification

type Verification struct {
	ModelCount int
}

Verification 保存 AI Studio 登录页与模型目录验收结果

func Verify

func Verify(ctx context.Context, state *aistudio.StorageState, proxy string) (Verification, error)

Verify 验证账号可访问 WAA 页面并读取实时模型目录

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL