INNER CODE UNIT · Python

auth_start

CassiopeiaCode/q2api · account-feeder/app.py:175

async def auth_start(body: Optional[AuthStartRequest] = None):
    """开始设备授权流程"""
    # 注册客户端
    client_id, client_secret = await register_client()

    # 开始设备授权
    device_data = await start_device_authorization(client_id, client_secret)

    # 生成会话 ID
    auth_id = str(uuid.uuid4())

    # 存储会话信息
    AUTH_SESSIONS[auth_id] = {
        "clientId": client_id,
        "clientSecret": client_secret,
        "deviceCode": device_data["deviceCode"],
        "interval": device_data["interval"],
        "expiresIn": device_data["expiresIn"],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…