INNER CODE UNIT · Python

auth_claim

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

async def auth_claim(auth_id: str):
    """轮询并创建账号(调用原服务)"""
    if auth_id not in AUTH_SESSIONS:
        raise HTTPException(status_code=404, detail="授权会话不存在")

    session = AUTH_SESSIONS[auth_id]

    if session["status"] == "completed":
        raise HTTPException(status_code=400, detail="授权已完成")

    try:
        # 轮询获取 tokens
        tokens = await poll_for_tokens(
            client_id=session["clientId"],
            client_secret=session["clientSecret"],
            device_code=session["deviceCode"],
            interval=session["interval"],
            expires_in=session["expiresIn"],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…