async def get_white_label_oauth2_auth_url(
    *,
    request: Request,
    response: Response,
    db: AsyncSession = Depends(deps.get_db),
    white_label_id: UUID,
    user: User = Depends(deps.get_user),
) -> str:
    """Generate the OAuth2 authorization URL by delegating to oauth2_service.

    Args:
    -----
        request: The HTTP request
        response: The HTTP response
        db: The database session
        white_label_id: The ID of the white label to get the auth URL for
        user: The current user

    Returns:
    --------
        str: The OAuth2 authorization URL
    """
    # Handle CORS for white label
    await _handle_white_label_cors(request, response, white_label_id, db, user)

    # Handle OPTIONS request for preflight
    if request.method == "OPTIONS":
        return ""

    white_label = await crud.white_label.get(db, id=white_label_id, current_user=user)
    if not white_label:
        raise HTTPException(status_code=404, detail="White label integration not found")
    if white_label.organization_id != user.organization_id:
        raise HTTPException(status_code=403, detail="Not enough permissions")

    return await oauth2_service.generate_auth_url_for_whitelabel(db=db, white_label=white_label)
Generate the OAuth2 authorization URL by delegating to oauth2_service.

    Args:
    -----
        request: The HTTP request
        response: The HTTP response
        db: The database session
        white_label_id: The ID of the white label to get the auth URL for
        user: The current user

    Returns:
    --------
        str: The OAuth2 authorization URL
    
backend/airweave/api/v1/endpoints/white_label.py